Node

Node Global Timer Simple Web Server Module Postgres DB
O O

Weather Controls

Time Of Day
Rain
Wind Speed
Wind Direction
Clouds

Node : Simple Web Server

2022-02-10
import http from "http";
var server = http.createServer(function (req, res) { 
    if (req.url == '/') {
        res.writeHead(200, { 'Content-Type': 'text/html' });       
        res.write('<html><body><p>SIMPLE WEB SERVER TEST</p></body></html>');
        res.end();   
    } else {
        res.end('Invalid Request!');
    }
});
server.listen(port);
console.log(`Node.js web server at port ${port} is running..`)