Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@burkeholland
Last active April 17, 2019 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burkeholland/613f4495067da3d58227d812519a0b62 to your computer and use it in GitHub Desktop.
Save burkeholland/613f4495067da3d58227d812519a0b62 to your computer and use it in GitHub Desktop.
const express = require("express");
const app = express();
const fs = require("fs");
const port = process.env.PORT || 3000;
// viewed at http://localhost:3000
app.get("/", function(req, res) {
res.send("Again I Go Unnoticed");
});
app.get("/read", function(req, res) {
// this does not exist
fs.createReadStream("my-self-esteem.txt");
});
app.listen(port, () => console.log(`Example app listening on port ${port}!`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment