Skip to content

Instantly share code, notes, and snippets.

@supersonictw
Last active August 5, 2025 03:58
Show Gist options
  • Save supersonictw/467ff2594b263c2ac2aa25df80641dd2 to your computer and use it in GitHub Desktop.
Save supersonictw/467ff2594b263c2ac2aa25df80641dd2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
"use strict";
const http = require("node:http");
const port = process.env.SERVER_PORT || "8000";
http.createServer((req, rsp) => {
rsp.writeHead(200,{
"Content-Type": "text/plain"
});
rsp.end("Hello! Server");
}).listen(port);
console.info(`Server is running at http://localhost:${port}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment