Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const http = require('http');
- //the custom module for date and time
- const dateTime = require('./datetimemodule.js');
- http.createServer(function(req, res){
- //Some css in this div
- res.write("<div style='text-align:center; font-family:Calibri; font-size:40px'>");
- //Date
- res.write("<h1>Date : " + dateTime.DateTime().date + "</h1>");
- //Time
- res.write("<h1>Time : " + dateTime.DateTime().time + "</h1>");
- //Day
- res.write("<h1>Day : " + dateTime.DateTime().day + "</h1>");
- res.write("</div>");
- res.end();
- }).listen(8050);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement