function CreateWebServer() {
http.post("/growtopia/server_data.php", function(req, res) {
setTimeout(() => {
res.send(`server|127.0.0.1\nport|17091\ntype|1\n#maint|Mainetrance message (Not used for now) -- NodeJS-GTPS\n\nbeta_server|127.0.0.1\nbeta_port|17091\n\nbeta_type|1\nmeta|localhost\nRTENDMARKERBS1001`)
}, 750)
});
http.start(80)
.then(() => console.log(`Growtopia webserver started at port 80`))
}
CreateWebServer()
setTimeout(() => {
HostHandler.start()
}, 5000);
but i was wandering, why is only one being ran? It's not logging the webserver started. HostHandler.start() is the cpp binding that opens a server with enet on c++ side, while http is restana.
@Alexander9673 a native addon does not seem to be involved in the code you posted. If you are having issues with Node.js' HTTP server, please create a new issue in the Node.js core repository at
I have this code
but i was wandering, why is only one being ran? It's not logging the webserver started.
HostHandler.start()
is the cpp binding that opens a server with enet on c++ side, whilehttp
is restana.