From 24a65c0e6530fd5184ec2d94c159639edc655ad8 Mon Sep 17 00:00:00 2001 From: JJ Date: Tue, 23 Jun 2026 21:31:48 +0000 Subject: [PATCH] Add index.js --- index.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..605b570 --- /dev/null +++ b/index.js @@ -0,0 +1,39 @@ +const http = require('http'); + +const PORT = 3010; + +// Create a server that sends a simple HTML page +const server = http.createServer((req, res) => { + res.statusCode = 200; + res.setHeader('Content-Type', 'text/html'); + + // Your HTML goes right here inside the backticks + res.end(` + + + + Node App + + + +

Hey, this is working!3

+ + + `); +}); + +// Start the server +server.listen(PORT, () => { + console.log(`Server is running! Open your browser and go to: http://localhost:${PORT}`); +}); \ No newline at end of file