Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save stevenspads/fe46bbb772a9c53f73d77b655d879e3b to your computer and use it in GitHub Desktop.

Select an option

Save stevenspads/fe46bbb772a9c53f73d77b655d879e3b to your computer and use it in GitHub Desktop.
//1. INSTALL EXPRESS GENERATOR
//Needed to generate Express projects
$ sudo npm install -g express-generator
//2. CREATE THE EXPRESS FOLDER STRUCTURE
$ express [project-name]
//3. SET PORT #
//in bin/www file change '3000' to '8000' or any preferred port number
var port = normalizePort(process.env.PORT || ‘3000’);
//4. INSTALL ALL EXPRESS DEPENDENCIES
//In the terminal, go to [project-folder] and type
$ npm install
//5. START NODE SERVER
//In the terminal, type:
$ node bin/www
//or
$ npm start
//6. TEST IT
//Go to localhost:8000 and if it worked, you’ll see a 'Welcome to Express' page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment