Created
July 18, 2016 04:59
-
-
Save stevenspads/fe46bbb772a9c53f73d77b655d879e3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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