Getting Started Locally
Building Locally​
Setting up the Environment​
To contribute to GPTRouter, ensure that your system meets the following requirements:
- Node.js 18 LTS or later
- npm or yarn package manager
- PostgreSQL database
Installing GPTRouter​
To install and set up the GPTRouter project, follow these steps:
- Clone the repository:
git clone https://github.com/Writesonic/GPTRouter.git
cd GPTRouter/
- Install project dependencies:
npm install
# or
yarn install
Setting up PostgreSQL​
GPTRouter requires a PostgreSQL database to function. Follow these steps to set up PostgreSQL:
Install PostgreSQL in your local environment. Refer to the official PostgreSQL documentation for installation instructions based on your operating system.
Create a new PostgreSQL database:
createdb model_router_db
- Set the DB credentials in .env using .env.example as reference:
Make sure to replace username
and password
with your own PostgreSQL credentials.
Running GPTRouter​
To run the GPTRouter project on your local machine, follow these steps:
- Start the application:
npm start
The application should now be running on http://localhost:8000
.