DFreds / Emaily

Emaily app for Udemy class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emaily

Deployment

This app is using Heroku for deployment. The Heroku CLI is required.

Initial Configuration

  1. Create a Heroku account
  2. Download the Heroku CLI
  3. Login to the Heroku CLI by using heroku login
  4. (DO NOT DO THIS AGAIN UNLESS NEW PROJECT) Create a new heroku app by running heroku create. Use the 2nd link and add it as a remote origin (below one is the one ).
  5. Add remote heroku through git remote add heroku {the 2nd link}. The one for my app is https://git.heroku.com/obscure-gorge-31285.git.

Dynamic Port Binding

The dynamic port is provided by Heroku via an enviromnent variable. For basic development work, the port is 5000.

Specify Node Environment

We must tell Heroku what versions of Node and NPM to use. This is specified in the package.json file like so:

"engines": {
  "node": "8.8.1",
  "npm": "5.0.3"
}

Specify Start Script

We need to instruct Heroku how to start up our server. This is specified in the package.json file like so:

"scripts": {
  "start": "node index.js"
}

Deploying

To deploy, simply run git push heroku master. To test the deployment, run heroku open. heroku logs will print out the logs in case of any errors.

About

Emaily app for Udemy class


Languages

Language:JavaScript 100.0%