GithubHelp home page GithubHelp logo

Comments (6)

ilabacheuski avatar ilabacheuski commented on August 21, 2024

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.

kasp1 avatar kasp1 commented on August 21, 2024

What could the startup command (apiko run <environment>) look like if we used process.env? How would it work?

from apiko.

ilabacheuski avatar ilabacheuski commented on August 21, 2024

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.

kasp1 avatar kasp1 commented on August 21, 2024

Okay, let's keep it in mind. We'll still have this option in the config though, right?

from apiko.

ilabacheuski avatar ilabacheuski commented on August 21, 2024

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.

kasp1 avatar kasp1 commented on August 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.