commit 2450eb1066333a6877fbdb7dca7a7c9253069715 Author: John Date: Wed Sep 23 16:49:12 2026 +0530 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/app.js b/app.js new file mode 100644 index 0000000..6e1a85f --- /dev/null +++ b/app.js @@ -0,0 +1,26 @@ +const http = require("http"); + +const PORT = 3002; + +const server = http.createServer((req, res) => { + res.writeHead(200, { + "Content-Type": "text/html" + }); + + res.end(` + + + + My Node App + + +

Hello from Node.js!

+

Welcome, This application is running on Windows 10.

+ + + `); +}); + +server.listen(PORT, () => { + console.log(`Server running at http://localhost:${PORT}`); +}); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c768b5f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "my-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "my-node-app", + "version": "1.0.0", + "license": "ISC" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..06aab74 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "my-app", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "start": "node app.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "" +}