Last active
January 19, 2022 04:54
-
-
Save modster/87b464fa6432f9250628b32847cc4fc9 to your computer and use it in GitHub Desktop.
Simple Express 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
const express = require('express') | |
const app = express() | |
const port = 3000 | |
app.get('/', (req, res) => { | |
res.sendFile(__dirname + '/index.html'); | |
}); | |
app.listen(port, () => { | |
console.log(`Example app listening at http://localhost:${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment