Skip to content

Instantly share code, notes, and snippets.

@evangow
Last active October 29, 2017 17:56
Show Gist options
  • Save evangow/9372f894b5505a3f46db3e26a192d381 to your computer and use it in GitHub Desktop.
Save evangow/9372f894b5505a3f46db3e26a192d381 to your computer and use it in GitHub Desktop.
//npm modules
const express = require('express');

// create the server
const app = express();

// create the homepage route at '/'
app.get('/', (req, res) => {
  res.send('you just hit the home page\n')
})

// tell the server what port to listen on
app.listen(3000, () => {
  console.log('Listening on localhost:3000')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment