Problem to host angular application

Asked

Viewed 239 times

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.

Minha hospedagem default

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 Minha hospedagem

I believe I have to change something in server.js to make my index.html the home page, as I should do?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.