Comments (6)
Since apiko is node application why not to use NODE_ENV?
And it can be accessed by process.env
Simple and common practic: Express, Sequelize-CLI
from apiko.
What could the startup command (apiko run <environment>
) look like if we used process.env? How would it work?
from apiko.
Setting NODE_ENV:
linux & mac: export NODE_ENV=production
windows CMD (not PS!): set NODE_ENV=production
Production: apiko run
Development set NODE=development && apiko run
Testingset NODE=test && apiko run
something like it. And for cross-platform setting there is plugin cross-env
So the deployment option is stored in user environment variable NODE_ENV(we can name it differently of course). And in CLI you just access it by process.env.NAME_OF_NEEDED_VARIABLE
from apiko.
Okay, let's keep it in mind. We'll still have this option in the config though, right?
from apiko.
Yeah. If we need it. In Production you don't need this option at all. That's why NODE_ENV is usually used.
In package.json is possible to have scripts run, dev, test
and so on.
from apiko.
I realized that if someone runs apiko setup <project_directory>
then the starter template is downloaded and it always contains the starter configuration where dev
is always the development environment and that gets start up.
Theoretically we could open the browser tab just for the apiko setup <...>
command. Just for the newbies so they don't get confused about no UI appearing. This way we could implement it in the CLI tool.
Thinking...
from apiko.
Related Issues (20)
- "owner" property in all collections
- Owner exception in ender.checkRestrictions()
- Only owner data from GET (many)
- All endpoints accessible with the server's secret
- Password reset endpoint HOT 1
- Password change endpoint HOT 1
- The password change endpoint sends a 500 status code. HOT 1
- checkRestrictions compare letters not roles HOT 2
- DELETE /users has no handler HOT 2
- Unused verifyPassword() in data.js HOT 8
- Admin password change of other users still requires the old password parameter (doesn't matter if it's correct or not)? HOT 4
- Order and group parameters in generic GET
- Password reset HOT 1
- Literal logout HOT 2
- File update (PUT)
- Problem using ProxyPass Apache HOT 6
- Make event system for apiko HOT 4
- Apiko should automatically reconnect to database
- Password recovery email is not sent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apiko.