Please help, proxy server not working on deployement

const express = require("express");
const router = express.Router();

router.get("/movies", (req, res) => {
  try {
      .then((res) => res.json())
      .then((data) => res.status(200).json(data));
  } catch (err) {

router.get("/hello", (req, res) => {

module.exports = router;

Trying to hide my API key using back-end server as a relay. However after deployment when I go to the endpoint ending with /movies, just an empty object {} is returned. When I go to the test endpoint ending with /hello, it is working perfectly. The endpoint /movies is working fine locally but not on deployment. Please help how I can rectify this.

Hi Akash,

Could you add some additional logging to your application for debugging purposes, then check for service logs for clues? For instance, make sure you have the correct API key, and ensure your response from API looks the way you expect it to etc.



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