/sample-node-express-template

A template to get started with Node / Express

Primary LanguageJavaScriptMIT LicenseMIT

Sample Node Express Template

Fork this template repository to get started with Node / Express.

Or follow the steps below to create your own:

Create the repository

  1. In Github Desktop: Choose File > New Repository
  2. Name: The name of your project, e.g. sample-node-express-template
  3. Local Path: The directory on your computer where you keep your projects
  4. Create Readme: Yes
  5. Choose Repository > Open in Terminal

Initialize NPM

In Terminal...

# initialize NPM - just hit return for each of these for now
npm init
# install nodemon for development
npm install -g nodemon
# install project dependencies
npm install --save express express-handlebars node-fetch
# open in Atom
atom .

Notes on the file structure

In Atom, add the following files from the source from this repository...

Start the application

  1. Start the app: npm start
  2. Check that your app is running https://localhost:3000/

The following start options are also available

  • Start in development mode (with nodemon --inspect) npm run start-dev
  • If you are using HTTPS locally (with nodemon --inspect) npm run start-https

Notes