I've been working on deploying a full-stack application via Google App Engine. If I try to let App Engine build from source, Google's buildpacks obviously doesn't know what to do with my Yarn workspace dependency URLs. So for the client, I just build locally and deploy the static asset. No problem. (This is a partial workaround for Deploying yarn workspace monorepo app with internal dependencies to Google App Engine and, more obliquely, How can I deploy to Google App Engine an app that depends on a yarn workspaces without publishing the packages to a npm registry?)
This is fine for a client, but I'm running into an issue deploying the back-end: evidently, the server should listen on the App Engine environment's PORT env var. The only way that I can think of to accomplish this is to deploy the source and allow it to be be built via Google App Engine; but, as I mentioned, this is incompatible with workspace dependency URLs. The node app still runs (and can even perform egress) if I build it locally before deploying to GAE, but because it is not listening on the PORT env var the server takes no requests. I don't want to have to publish the back-end's workspace-level deps.
I'm sure someone must have experience deploying a node app which depends on both Yarn workspace-level dependencies and production-env-scope env vars. Can you give me some direction?
(Edit: it would be better to adopt the paradigm described by jonrsharpe in the comments above---that is, retrieve environment variables from the actual production environment (i.e. App Engine) instead of baking them into a build.)
I just had to listen on port 8081 (that is, build locally with PORT set to 8081 and then deploy the built server). Perhaps 8080 was taken up either the default service (the client, in my case) or perhaps by nginx. I'm not quite sure, but I'm moving on for now.