From 8a47d5dc29edd1b0c89730eb016dd682e2692d7b Mon Sep 17 00:00:00 2001 From: John Date: Tue, 22 Sep 2026 16:32:32 +0530 Subject: [PATCH] first commit --- app.js | 26 ++++++++++++++++++++++++++ package.json | 12 ++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 app.js create mode 100644 package.json 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": "" +}