mardi 9 novembre 2021

How do I redirect http requests from angular though a node express server, to a web API?

I'm trying to create a node express server with the purpose to point the API calls made in an angular project to a web API. At the same time I don't want to handle the web API credentials in the frontend. If anybody with experience in this would help me it would be very appreciated

This is what I already have:

  • Angular frontend
  • Simple node express app that listens to a port.
const express = require("express");

const _port = process.env.PORT || 14300;
const app = express();

// ---- START UP THE NODE SERVER  ----
app.listen(_port, () => {
  console.log("Node Express server for " + app.name + " listening on https://localhost:" + _port);
});




Aucun commentaire:

Enregistrer un commentaire