Skip to content

Instantly share code, notes, and snippets.

@matthewharwood
Created February 9, 2016 01:29
Show Gist options
  • Save matthewharwood/7a91695045f21230efee to your computer and use it in GitHub Desktop.
Save matthewharwood/7a91695045f21230efee to your computer and use it in GitHub Desktop.
//from terminal run
npm install express --save;
//server.js
var path = require('path');
var express = require('express');
var app = express();
var staticPath = path.resolve(__dirname, '/public');
app.use(express.static(staticPath));
app.listen(3000, function() {
console.log('listening');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment