[Solved] 2 HTMLs at the same time on glitch [express]

html
javascript

#1
  1. Is it possible to run 2 HTMLs on glitch at the same time? Maybe this is not a glitch question but a node\express one.
  2. Would be great if someone can demonstrate it with some basic code or link a demo.

#2

What do you mean by having 2 htmls?


#3

That One project can run 2 html on different urls, that i can open at the same time


#4

When you say two urls, do you mean two different page level urls? Like

  • mycoolglitchproject.xyz/page-1.html and
  • mycoolglitchproject.xyz/page-2.html

having different content?

Or do you mean two different domains

  • mycoolglitchprojectaboutcats.xyz and
  • mycoolglitchprojectaboutdogs.xyz

having different content, but being served by the same Glitch project?


#5

Both suit me fine.
But i guess you’re implying that the 2 second option is not doable.


#6

That is correct, You would have to have 2 projects to be able to do the second one.


#8

You literally just need to create a second app get + response, with a new url

app.get(’/html3’, function(request, response) {
response.sendFile(__dirname + ‘/index3.html’);
});