In a Node.js Project website do not work


#1

In my Node.js App (generated by glitch) when ever I want to add the file, team.html and I type in /team.html in my search bar right after https://blacklist-list.glitch.me/. Example: https://blacklist-list.glitch.me/team.html

The result is Cannot GET /team.html

Please help me.


#2

so if team is a page that you want to add to the app, you’ll have to add some code to your server.js file (if that’s what it’s called, it looks like your app is private so i cannot view the source).

if you take a look at this example: https://glitch.com/edit/#!/hulking-talk?path=server.js:15:100:

…i have a team.html file that i want to send when a user goes to my app /team.html. there is nodejs code there that tells the server what to do (send team.html) when the user goes to that url.


#3

since the app is generated by glitch, you probably have a /views folder. i tend to put my html files in there (you can rename team.html to views/team.html) and tell node to send (for example) __dirname + '/views/team.html