Running Locally - connorakey/roblox-ranking-api GitHub Wiki

Running Locally

This guide will help you run the Roblox Ranking API on your local machine without using Docker. This method works on any operating system that supports Node.js.


Prerequisites

  • Node.js installed (version 16 or newer recommended)
  • npm (Node.js package manager) installed
  • A properly configured .env file with your environment variables (see the Setting up your .env file wiki page)

Step 1: Clone the Repository

Open your terminal or command prompt and clone the repository:

git clone https://github.com/connorakey/roblox-ranking-api

Navigate into the project directory:

cd roblox-ranking-api

Step 2: Install Dependencies

Install the required Node.js packages by running:

npm install

This will download and set up all dependencies listed in package.json.

Step 3: Create and Configure Your .env File

Make sure you have created a .env file with the necessary environment variables:

- Roblox cookie

- PORT number

- MongoDB URI

If you need help setting this up, please refer to the Setting up your .env file wiki page.

Step 4: Start the Server

Start the API server by running:

node .

The API should now be running on the port specified in your .env file.

Step 5: Verify the API is Running

You can verify the API is up by opening your browser or running:

curl http://localhost:$PORT

Replace $PORT with the port number you configured in your .env file.

Troubleshooting

Ensure Node.js and npm are properly installed

Check that your .env file has all required variables correctly set

Verify the port you chose is free and not blocked by any firewall

Summary

git clone https://github.com/connorakey/roblox-ranking-api
cd roblox-ranking-api
npm install
node .

You're now running the Roblox Ranking API locally! For more information or help, check other wiki pages or open an issue on GitHub.