Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Getting a Node Application Set Up
- 1. Install node by running the command below in the terminal
- brew install node
- 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.
- 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
- 4. Once the terminal is open we are going to run the following commands:
- npm init (Press enter through all the options it pops up.)
- npm install express (Express is a big library of Javascript functions that will set up our server)
- npm install express-generator -g
- express --view=pug (Type y then enter if it says "Directory not empty do you want to continue")
- npm install -g nodemon
- npm install
- nodemon
- (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