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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started