so I have a Express Typescript codebase:
public initRoutes() {
new TemplatesModule(this.app)
this.app.get("/image", (req, res) => {
request.get("https://ik.imagekit.io/scenify/kW7LCO9gy_blKfank60BHO3i.png?tr=w-480").pipe(res)
})
}
private initMiddlewares() {
this.app.use(notFound)
this.app.use(errorHandler)
}
So basically I have /templates API route I that connects my MongoDB db to the backend.
So the problem is, In my localhost, I can access my /templates API. However when I try to access the /templates in production at https://consumer-grammable.herokuapp.com/templates, it didn't work. The status code was 304 (its not an error, its "not changing").
If you notice the codebase, I've tried doing https://consumer-grammable.herokuapp.com/image, and it works, but /templates don't work for some reason when it works in development. Any idea why it doesn't work? I suspect it was MongoDB problems, and it maybe it. However, I've changed the network access setting into Allow from anywhere, and it still doesn't work. Can someone help?