Search code examples
node.jssteam-web-api

Steam Web API via Node.js on my shared hosting


Basically, what I'm trying to do is have the Steam Web API running via Node.js on my shared hosting so I can display Steam user profile information on my site. Unfortunately, I'm having a lot of trouble getting it working. I've been following this guide.

This is what I followed to get NodeJS running.

I have it set up like so:

Node.js version - 9.11.2
Application mode - Production
Application root - /home/<name>/nodejs/steamapi-server
Application URL - <mysite.com>/steamapi-server
Application startup file - server.js

My server.js file (minus my API key).

My package.json file.

All dependencies are installed and the script is running. However, when I go to /steamapi-server all I get is: Cannot GET /steamapi-server/ whereas I would normally be seeing "Hello, World!". I tested this all locally beforehand and it was working.


Solution

  • Turns out I needed to change app.get('/' to app.get('/steamapi-server'

    Now it's working.