Last active
April 12, 2023 19:45
-
-
Save fyx99/4a034a6bd7454fabec74d8c70dbd0bb2 to your computer and use it in GitHub Desktop.
Node.Js Example HTTP Server
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 port = 3333 | |
app.get('/', (req, res) => { | |
res.send('Hello World!') | |
}) | |
app.listen(port, () => { | |
console.log(`Example app listening on port ${port}`) | |
}) | |
// run this server with | |
// node app-http.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment