A template for easily creating Express.js Websites.
Use the following command to get started:
$ git clone 'https://github.com/LiamGlasson/Express-Template'
To install the required dependencies, open a terminal and run the following command:
$ npm install
- To start the server normally, use:
$ npm run start
- To start the server in developer mode, use:
$ npm run dev
The template is set by default to use a .env
file when configuring which port to run on. This file can also be configured to store other secrets such as database credentials, and as such should never be uploaded publicly.
If you do not wish to use a .env
file, you should delete it and update the following code:
// File Location: ./Express-Template/bin/www
// Before:
const port = normalizePort(process.env.PORT);
// After:
const port = normalizePort(3000);