commit 8a47d5dc29edd1b0c89730eb016dd682e2692d7b Author: John Date: Tue Sep 22 16:32:32 2026 +0530 first commit diff --git a/app.js b/app.js new file mode 100644 index 0000000..257673c --- /dev/null +++ b/app.js @@ -0,0 +1,26 @@ +const http = require("http"); + +const PORT = 3001; + +const server = http.createServer((req, res) => { + res.writeHead(200, { + "Content-Type": "text/html" + }); + + res.end(` + + + + My Node App + + +

Hello from Node.js!

+

This application is running on Windows 10.

+ + + `); +}); + +server.listen(PORT, () => { + console.log(`Server running at http://localhost:${PORT}`); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..e9776f2 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "my-node-app", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "" +}