Last active
April 17, 2019 16:42
-
-
Save burkeholland/613f4495067da3d58227d812519a0b62 to your computer and use it in GitHub Desktop.
This file contains 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
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