Skip to content

Instantly share code, notes, and snippets.

@patrickhulce
Last active August 5, 2016 21:48
Show Gist options
  • Save patrickhulce/258db1bb531554ed92c5 to your computer and use it in GitHub Desktop.
Save patrickhulce/258db1bb531554ed92c5 to your computer and use it in GitHub Desktop.
Basic Ubuntu Express Setup
# 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