Express page shows Glitch 404 page, "Well, you found a glitch."

Hi, I’m making an express app on glitch, using EJS, I have the following code:

const express = require('express');
const app = express();
app.set('view engine', 'ejs');

app.get('/test', (req, res) => {
  console.log('Incoming request');
  res.render('test.ejs')
});


app.listen(process.env.PORT, () => {
  console.info('Running on port 3000');
});

When I visit my project’s URL /test, it shows the glitch 404 page, Well, you found a glitch. How do I fix this? Thanks for the help!

Just to clarify, this is the error message I receive when I visit https://[my-project].gitch.me/test

If your project is private, clicking “Log in” should take you to it. If it’s not private, can you tell us the name of the project so we can take a look (and you can email support@glitch.com if you want to keep it private but still get some help!)

Thank you, I think that’s it. Is there any way to keep the source code on private but the website accessible?

Yes, one of the other options when changing your project’s privacy is to make just the code private. You can see more in our doc here: OMG, the whole world can see my project's code! Can I make it private? - Glitch Support

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.