Skip to content

Instantly share code, notes, and snippets.

@hasnainmakada-99
Created April 5, 2023 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasnainmakada-99/1aa89b6266feaa675839e40994b2cf74 to your computer and use it in GitHub Desktop.
Save hasnainmakada-99/1aa89b6266feaa675839e40994b2cf74 to your computer and use it in GitHub Desktop.
app.js file
const express = require("express");
const app = express();
app.use(express.static("public"));
const PORT = 3000;
app.get("/", (req, res) => {
res.sendFile(__dirname + "/index.html");
});
app.listen(PORT, (error) => {
console.log("Serving at http://localhost:3000");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment