Skip to content

A template for easily creating Express Websites.

Notifications You must be signed in to change notification settings

LiamGlasson/Express-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express Template

A template for easily creating Express.js Websites.


Cloning

Use the following command to get started:

$    git clone 'https://github.com/LiamGlasson/Express-Template'

Dependencies

To install the required dependencies, open a terminal and run the following command:

$    npm install

Usage

  • To start the server normally, use:
$    npm run start
  • To start the server in developer mode, use:
$    npm run dev

.env File

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);

About

A template for easily creating Express Websites.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published