Created
July 31, 2017 08:11
-
-
Save RomkeVdMeulen/14ab925b75a10f5f80c6dae0f3ceb092 to your computer and use it in GitHub Desktop.
How to serve content with ExpressJS in 3 quick steps
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
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