/mfb-nodejs-boilerplate

a boilerplate template for building a NodeJS application with Express, hosted on Heroku

Primary LanguageJavaScript

mfb-nodejs-boilerplate

WTF is this? A boilerplate application as a good starting point to building out a hobby NodeJS application hosted on Heroku.

Technologies

  • NodeJS
  • Express
  • Auth0 (user authentication)
  • Bootstrap (UI templates)
  • HTML5 Boilerplate (HTML5 starting point)

Clone

Clone this repo to your own project

Configure

Duplicate /.env-template and save as /.env

OR

Create a fresh /.env file with the following settings

# environment variables

# App settings
APP_URL=    "mfb-nodejs-boilerplate.herokuapp.com"
APP_NAME=   "mfb-nodejs-boilerplate"
APP_TITLE=  "MFB Boilerplate"
APP_SECRET= ""
# http://md5.my-addr.com/online_random_md5_hash_generator-and-md5_random_hash.php

# Google analytics account - if using Google Analytics
GA= ""

# Auth0 settings (if using AUTH0 for authentication)
# NB: callback does not include the domain
AUTH0_DOMAIN=   ""
AUTH0_CLIENT=   ""
AUTH0_SECRET=   ""
AUTH0_CALLBACK= ""

  • insert app configuration settings within .env file. By defualt it will not be tracked within git
  • create a random APP_SECRET value from here perhaps?
  • save the .env file

Setup

$ nvm use - use the correct node version for installation and running

$ yarn install - install dependencies and build

$ yarn dev - run local instance (http://localhost:3000/)

Reference materials