Skip to content

austinsamsel/neware-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#NEWARE Server

ship code

  1. Run yarn run deploy to ship.

  2. after testing deploy, set the alias to neware-server like:

now alias https://neware-server-___________.now.sh neware-server

  1. The new instance will be available at https://neware-server.now.sh

secrets

Secrets are saved locally and not committed to git. Secrets are located in a .env file, and pulled into the app via the dotenv package.

# .env
GREETING=hi
NAME=hightops

example of use:

// index.js
var greeting = process.env.GREETING;
var name = process.env.NAME;

module.exports = function() {
  return `${greeting}, ${name}!!`;
}

To deploy secrets, we add them to Now like this:

now secret add greeting Hello now secret add name User

Then in the package.json, we reference the secrets while deploying. When the environment is built on Now then the secret values are updated.

"deploy": "now -e GREETING=@greeting -e NAME=@name"

Run now secret for help.

reference: [Configure secrets and environment variables with Zeit's Now](source: https://egghead.io/lessons/tools-configure-secrets-and-environment-variables-with-zeit-s-now)

About

clean up service for neware

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published