Last active
August 5, 2016 21:48
-
-
Save patrickhulce/258db1bb531554ed92c5 to your computer and use it in GitHub Desktop.
Basic Ubuntu Express Setup
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
# First, install Ubuntu 16 LTS (http://www.ubuntu.com/download/desktop) and open a terminal | |
# sudo means 'do this thing as the superuser', apt-get is a way to install software, nodejs and npm are two software packages you'll need | |
sudo apt-get install nodejs npm | |
# Creates the directory 'myfirstserver' | |
mkdir myfirstserver | |
# Changes the current directory to myfirstserver | |
cd myfirstserver | |
# Installs the 'express' framework for Node.js | |
npm install express | |
# Opens 'app.js' for text editing, make it look like the guide here (http://expressjs.com/starter/hello-world.html) | |
nano app.js | |
# Runs 'app.js', you should see output and be able to open a browser to localhost:3000 to see 'Hello World' | |
node app.js | |
# Congrats you just made your first server! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment