Skip to content

Instantly share code, notes, and snippets.

@christopherbauer
Created May 5, 2024 17:01
Show Gist options
  • Save christopherbauer/b09541b667723f3bb1ccc9e60441335f to your computer and use it in GitHub Desktop.
Save christopherbauer/b09541b667723f3bb1ccc9e60441335f to your computer and use it in GitHub Desktop.
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