var http = require(“http”);
function onRequest(request, response) {
nsole. log(” function start “);
response. WriteHead (200, {” content-type “:” text/plain “});
response. Wirte (” hello “);
the response. The end ();
}
http.createServer(onRequest).listen(8888);
console.log(“Server has startsed”)
Get Node’s HTTP module first.
var http = require(“http”);
Write the handler function. onRequest
Create the server and listen on port 8888
http.createServer(onRequest).listen(8888);
function onRequest(request, response) {
nsole. log(” function start “);
response. WriteHead (200, {” content-type “:” text/plain “});
response. Wirte (” hello “);
the response. The end ();
}
http.createServer(onRequest).listen(8888);
console.log(“Server has startsed”)
Get Node’s HTTP module first.
var http = require(“http”);
Write the handler function. onRequest
Create the server and listen on port 8888
http.createServer(onRequest).listen(8888);
Read More:
- Flume profile case (Port listening)
- The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in u
- Android error: ADB port is occupied( adb.exe ,start-server’ failed — run manually if necessary)
- filezilla Failed to create listen socket on port 21 for IPv4 solution
- Using code to create control objects, set the event listening method does not execute
- Node.js Using port 80 to report errors in Linux
- Creating Server TCP listening socket 127.0.0.1:6379: bind: No error。。。 Solutions to problems encountered in startup
- Creating Server TCP listening socket 127.0.0.1:6379: bind: No error
- Start gzip in node environment of project optimization
- Windows redis startup error reported: Creating Server TCP listening socket 127.0.0.1:6379: bind: No error
- Port 4200 is already in use.Use ‘-port’ to specify a different port error Reasons
- Server check fail, please check server 192.168.11.13 ,port 9848 is available , error ={}
- Server Tomcat v8.0 Server at localhost failed to start.
- [Solved] Tomcat Failed to Start Error: Server Tomcat v8.5 Server at localhost failed to start
- Server Tomcat v7.0 server at localhost failed to start
- Kafka opens JMX port and reports that the error port is occupied
- Through PID (process identification) to find the port (port) occupied applications, to solve the problem of port occupied
- Failure of spring boot configuration server port
- Alibaba cloud builds FTP server 200 port command successful. Consider using PASV. 425 failed to establish connection
- The Tomcat connector configured to listen on port 7014 failed to start