Skip to content

Instantly share code, notes, and snippets.

@RomkeVdMeulen
Created July 31, 2017 08:11
Show Gist options
  • Save RomkeVdMeulen/14ab925b75a10f5f80c6dae0f3ceb092 to your computer and use it in GitHub Desktop.
Save RomkeVdMeulen/14ab925b75a10f5f80c6dae0f3ceb092 to your computer and use it in GitHub Desktop.
How to serve content with ExpressJS in 3 quick steps
yarn add express # or 'npm install express'
echo 'var express = require("express");
var app = express();
app.use("/", express.static(__dirname));
app.listen(3001);' > serve.js
node serve.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment