Skip to content

Development Setup & Installation

John Gerome Baldonado edited this page Jan 23, 2023 · 13 revisions

Requirements

  • Redis
  • MySQL
  • NodeJs
  • PNPM

Installation

Clone the repository

git clone https://github.com/RxCP/rxcp

Install dependencies via pnpm (recommended)

cd rxcp && pnpm i

Setup API Server

The next thing we need to do is setup our API server.

At the root of the project cd to /apps/api

cd apps/api

Copy .env.example to .env

Setup Database

Create 1 database for your rxcp. This DB will be for the rxcp itself.

Don't know how to create a database? Click here

⚠️ Ragnarok database is required, If you don't have one kindly look at the example folder.

Update your database credentials in .env

// /apps/api/.env
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=root
MYSQL_DB_NAME=rxcp

RAGNAROK_HOST=localhost
RAGNAROK_PORT=3306
RAGNAROK_USER=root
RAGNAROK_PASSWORD=root
RAGNAROK_DB_NAME=ragnarok

After we're done changing the variables It's time to run the migration (Still at the /apps/api).

node ace migration:run

Then to add sample data run:

node ace db:seed

👍 That's It for the API setup.

📝 See Sample Data credentials here.

Setup Admin Web

At the root of the project cd to /apps/admin then copy .env.example to .env

Running the application

Running on development mode. This will run the api and admin.

pnpm dev

⚠️ more instructions coming soon