Created
May 5, 2024 17:01
-
-
Save christopherbauer/b09541b667723f3bb1ccc9e60441335f to your computer and use it in GitHub Desktop.
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
import express from "express"; | |
const app = express(); | |
app.use(express.json()); | |
app.get("/", (req, res) => { | |
res.send("Hello World"); | |
}); | |
const run = () => { | |
const port = process.env.port || 3000; | |
app.listen(port, () => { | |
console.log(`Server is running on ${port}`); | |
}); | |
}; | |
run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment