Question: In this project, you use node.js (also known simply as node) to create a local web server that that provides information on how busy your
In this project, you use node.js (also known simply as node) to create a local web server that that provides information on how busy your system is. It uses the Express library to create the server and runs a Bash shell command to get the system information to be returned. You must run this under ScotchBox because the system loading information returned is available from the Linux virtual machine.
please include any and all code you used to perform tasks. as well as as many screenshots as possible. make them good enough for me to copy/edit using the snipping tool.
Thanks so much.
Render the information at a web page -- this is a example: ---> http://127.0.0.1:8000
i included an example .js file i just don't know how to connect the server to the static web page
.js code below:
//Load HTTP module var http = require("http");
//Create HTTP server and listen on port 8000 for requests http.createServer(function (request, response) {
// Set the response HTTP header with HTTP status and Content type response.writeHead(200, {'Content-Type': 'text/plain'}); // Send the response body "Hello World" response.end('Hello World '); }).listen(8000);
// Print URL for accessing server console.log('Server running at http://127.0.0.1:8000/')
the local web server can work anyway i just need it to work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
