I have the following application that started out with Express as shown below:
const express = require('express');
const app = express();
let port = process.env.PORT||8080;
app.listen(port, async function () {
console.log(`Service running on port ${port} in ${app.get("env")} mode`);
});
However, I would like to use gRPC as well in same service. Unfortunately I can't because the gRPC server also need it's own separate PORT which has already been used by the Express Server.
Is there another way to get around this without spinning two containers for both servers?
I want both servers to use same PORT as my target environment is Google Cloud Run.
And unfortunately Google Cloud Run supports spinning only 1 container per service instance, so I'm seriously out of luck sort of from my own experience.