Created
July 20, 2020 21:00
-
-
Save brettvaida/ab13ce8bb27701d4a8ec1f3835c50ac2 to your computer and use it in GitHub Desktop.
The most basic Node server
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
let http = require("http") | |
let app = http.createServer((req, res) => { | |
if (req.url == "/") { | |
res.end("Hello World") | |
} else { | |
res.end("Page Not Found") | |
} | |
}) | |
app.listen(3000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment