I have this blog that i uploaded to netlify, the blog articles are made with a single ejs file but if you try to open an article there’s a 404 error. Also, if you go to the editor you wont get redirected to the auth0 login page, but you should. How can I fix it? This is the github repo, if you want to test it, you have to add firebase credentials in firebase.js and in post.ejs and also the auth0 credentials in .env
So please, how can I fix it? I still didnt find a solution
Sidenote: since the editor doesnt require login, you can potentially write anything you want. So, fell free to do it lol
There’s a LOT to unravel here. I don’t think I could take that much time. If it was just a 5 min solution, I wouldn’t mind helping out. To ping someone to do free consulting isn’t really fair to that person. Especially if it’s just a test project and you don’t have a budget for consulting.
You’re using Express and trying to start a server on Netlify. This doesn’t work. Instead, you need to make use of Netlify Functions. Using Express in Netlify Functions might need some additional config as explained here as a sample boilerplate. Finally, you might need to include your .ejs template in the Functions as explained here.
You can see an average usage of Express on Netlify Functions here.
For your Netlify Function to actually trigger whenever someone tries to access the posts, you would need Netlify Redirects.
While we won’t be able to develop a entire project for you to explore, we can continue leading you at the stages where you get stuck. So, at this point, try migrating your Express code to a Netlify Function and let’s see where that takes us.