Visiting My project domain shows Not Found


#1

Hey There Lovely Folks,
Recently my project name ionadev having a url https://ionadev.glitch.me/ shows me Not Found.

Can Anyone help me out with this please!??


#2

Hi :slight_smile:

it probably means that the webserver you created does not have a route for /.


#3

It has.
It should send Heya.
And also with express it would say Cannot Get /


#4

Then it might mean that you have another web server listening on another port, probably 8080, and Glitch uses that webserver instead of the express one you configured. Can I look at the source code of your project to see if this is right?


#5

Can i pm u the link?


#6

You can also send it to support@glitch.com and someone will take a look as soon as we can.


#7

I went to the site and it says hey.


#8

Make sure you have a file named server.js and have inserted the following information to let your website be online!

const express = require('express');
const path = require('path');
const app = express();

app.use(express.static('public'))
app.get("/", (request, response) => {
  response.sendFile(__dirname + '/view/index.html') //This is the page users will go first when visiting your website.
});

/// For each link you have in your website you must sort of enable the file by doing the following...
app.get("/donate", function (request, response) { // Needs to be there to list your link.
  response.sendFile(__dirname + '/files/donate.html'); /// This is the name of your file you want to be shown once users go to https://yourwebsite.glitch.me/donate
});

@bhangalepiyush


MOD EDIT: cleaned up the formatting a little

Thank you @cori , I didn’t knew how to do this…


#9

@Rienknr1 the Discourse user tutorials are pretty good for this stuff. If you skipped them the first time around you can start up a PM with @discobot and ask it to restart them (there are two)


#10

Hi! To find out what I can do, say @discobot display help.