Skip to content

Instantly share code, notes, and snippets.

@alexpilugin
Last active April 20, 2017 23:13
Show Gist options
  • Save alexpilugin/7454e641dbe23e11756e02873df4a158 to your computer and use it in GitHub Desktop.
Save alexpilugin/7454e641dbe23e11756e02873df4a158 to your computer and use it in GitHub Desktop.
Install Express.js using npm (Node Package Manager)
  1. $ mkdir app          /* create app folder */
  2. $ cd app          /* move inside the app folder / /
  • Before to install express.js you need to have minimum one of them:
  • package.json or node_modules */
  1. $ npm init          /* create package.json */
  2. $ npm install express --save          /* install express.js locally */
  3. $ npm install          /* install requested modules */
  4. $ npm ls          /* [optinal] show a list of installed packages / /
  • Before install express-generator globally:
  • $ [sudo] npm install -g express-generator */
  1. $ express -e -H -c app          /* scaffolding of app (with a new folder) */
  2. $ cd app && npm install
  3. $ npm start          /* launch Expresss server on: http://localhost:3000 */

$ touch README.md /* create README.md file */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment