Problem to host angular application

2

I'm a beginner with angular and I want to host a simple application on the host uol to study.

The server is working but I can not redirect it to the home page of my application.

Thecodeoftheserver.jsthatisrunningisthis:

// 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 think I have to change something on server.js to make my index.html on the homepage, how should I do it?

    
asked by anonymous 19.11.2017 / 18:13

0 answers