Skip to content

josecarballosa/env-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

env-test

Test of setting runtime app environment in different deployments

Run the app locally, without setting the environment

This option requires node running locally

node server.js
# or
npm start

Run the app locally, passing command line environment settings

This option requires node running locally

set PORT=4200 && node server.js
# or
npm run start:set

Run the app locally, pre-loading environment settings from a .env file

This option requires node running locally

  1. Make a copy of .example.env file and name it .env. Replace the values with your specific configuration. Note that this file is already listed in .gitignore so it won't get pushed to github. Do not to include extra spaces or quotes. These values are taken verbatum.
NODE_ENV=development
PORT=8626
  1. start the app
node -r dotenv/config server.js
# or
npm run start:dotenv

Run the app locally, inside of Docker container

This option requires ...

Run the app on Azure

This option requires ...

Run the app inside of Docker container hosted in Azure

This option requires ...

Reference material

About

configuration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published