Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. Getting a Node Application Set Up
  2.  
  3. 1. Install node by running the command below in the terminal
  4. brew install node
  5.  
  6. 2. We are going to put our site in a new directory and open it up in Visual Studio Code. So create a folder on the desktop or wherever you like and open it up.
  7.  
  8. 3. Open up the terminal in Visual Studio Code, you can do this by going to the toolbar at the top of the screen clicking on View > Integrated Terminal
  9.  
  10. 4. Once the terminal is open we are going to run the following commands:
  11. npm init (Press enter through all the options it pops up.)
  12.  
  13. npm install express (Express is a big library of Javascript functions that will set up our server)
  14.  
  15. npm install express-generator -g
  16.  
  17. express --view=pug (Type y then enter if it says "Directory not empty do you want to continue")
  18.  
  19. npm install -g nodemon
  20.  
  21. npm install
  22.  
  23. nodemon
  24.  
  25. (Hopefully with everything going right your server should now be started, if you open up a browser and go to localhost:3000 you should see the "Welcome to Express" screen
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement