Created
April 5, 2023 12:52
-
-
Save hasnainmakada-99/1aa89b6266feaa675839e40994b2cf74 to your computer and use it in GitHub Desktop.
app.js file
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(); | |
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