2
I’m a beginner with angular and I’m looking to host a simple application on the Uol host to study.
the server is working but I can’t redirect to my application homepage.
The code of the.js server that is running is this one:
// Load the http module to create an http server.
var http = require('http');
// Configure our HTTP server to respond with Hello World to all requests.
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello World 2\n");
});
// Listen on port 8080, IP defaults to 127.0.0.1
server.listen(process.env.PORT || config.port);
console.log("Listening on port: " + (process.env.PORT || config.port));
I want to point to my index.html
I believe I have to change something in server.js to make my index.html the home page, as I should do?