Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
I can fetch data in localhost but cannot in production

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!