As we have an Apache server running on a GCP machine, we now want to run an additional Node.js application on it.
Our final goal will be:
- apache hosts
https://project.site
, which is the existing website - node.js hosts
https://project.site/callback
, handling a POST request for Line messaging api
Before we start, I would sincerely advise you to use Firebase function instead if you only need a tiny node.js application running on a public URL (In my case, as I simply want to serve a /callback API POST, it is thus suitable to use firebase, but I pick a difficult path.
If you’re ready, then take a deep breathe and let’s go through this mess together.
Source: https://wendeehsu.medium.com/run-node-js-application-on-apache-server-c79985014869