Putting a NodeJS webapi onto the same server as NodeBB

  • I was wondering how I put a folder with some NodeJS scripts in it on the same server running NodeBB at the same time. I'm unsure where to put the folder or if I need to configure NodeJS as a HTTP server while keeping NodeBB in the same place.

  • Community Rep

    We'll need to know exactly what the api is you're trying to install to be sure.

    But generally, it's probably going to be running as a separate node process, using a screen session, the actual location of the folder won't matter. The app should have a config setting to set the listening port (or have a default port), and in your nginx/apache config, you'll need to redirect the api routes used by the app from port 80 to the app's configured port. Very similar to NodeBB itself.

  • https://github.com/kurt-stolle/exclserver-api

    Thats the API. I need it to run on the same place as a NodeBB forum running on port 80.

  • Just read something. I need to run it as a Linux app.

  • GNU/Linux

    Well... If you already have NodeBB running on port 80 without nginx/Apache proxy, then you can not assign another service on the port as well. I recommend you to set up an nginx/Apache proxy for NodeBB and create virutal hosts for each service you want to run on port 80 (this way you can run multiple services/sites on port 80).

Suggested Topics

| |