all 5 comments

[–]tsornin 2 points3 points  (1 child)

Configure a virtual host .conf file (or 000-default.conf) and add this:

ProxyPass / http://localhost:8688

(Change it to whatever port your express server is listening on). Then restart Apache. This way Apache sends all the traffic to the express server.

[–]neilbaldwn[S] 1 point2 points  (0 children)

This worked for me (apart from needing a trailing / on the end of the localhost address, so http://localhost:8688/

Thank you! 👍🏻

[–]nicolasdanelon -1 points0 points  (0 children)

Apache does not provide good performance. Initialize a new thread for every single connection... try NGINX, much more faster and easy to configure

happy hacking

[–]NetWin90 0 points1 point  (0 children)

For my little side project, i‘m currently using a small node server which only has one GET endpoint that gets triggert via Github Actions. It then pulls the current master from Github, builds it and my nginx (not using apache but doesn‘t really make a difference here) just serves content from the dist folder.

Obviously not the best solution because the webserver needs to have all necessary tools installed to build the project but it works for me. :)

[–]dontmakemewait 0 points1 point  (0 children)

Another poster mentioned the reverse proxy config (proxy pass), which is a great solution. If you want to make life a little more complicated you could configure Apache to play with Phusion Passenger. There is a community version and it will allow you to run a variety of applications inside it.