-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started
Install git and clone the repo:
git clone https://github.com/SCE-Development/spartan-compass/
-
I recommend using bun for faster installations and efficient disk space usage compared to npm.
-
Install bun with this command:
# Unix
curl -fsSL https://bun.sh/install | bash
# Windows
powershell -c "irm bun.sh/install.ps1 | iex"
- Install Docker:
- Start the local databases with:
bun run db:start
- Setup RedisInsight:
Once your containers are ready, visit http://localhost:5540/
and accept the terms of service.
Then, click Add Redis Database on the top left, and enter redis
for the host and 6379
for the port.
Once you've done this, you should be able to preview what our redis instance looks like.
To connect to the local database instance, you need to create a .env
file with the appropriate DATABASE_URL
.
- Create a
.env
file in your project root:
touch .env
- Open the
.env
file and update theDATABASE_URL
value to point to your local database instance as well as ourREDIS_URL
:
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
REDIS_URL="redis://localhost:6379"
Warning
Only do the third step after the Tutorial - Implementing a Complete Feature
- Generate and run our database migrations on our local db and optionally seed it for sample data:
bun run db:generate
bun run db:migrate
bun run db:seed
To start the application, you first need to install the dependencies with:
bun install
Then, start the application with:
bun dev
Congrats! If you reached this step, everything should be working. If you had any issues, feel free to post them in the dev team channel.
At this point, you should move on to Tutorial - Implementing a Complete Feature.