node js quit
process.exit();
node how to stop NodeJS server process
const http = require("http");
const server = http.createServer(function (req, res) {
const url = req.url;
if (url === "/") {
// do a 200 response
res.writeHead(200, { "Content-Type": "text/html" });
res.write("<h1>Hello World!<h1>");
res.end();
}
});
server.listen(3000, function () {
console.log("server started at port 3000");
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us