docs(core): clarify developing server docs (#9420)

This commit is contained in:
pengx17
2024-12-30 03:51:58 +00:00
parent b9f2650369
commit 87331b49b7
2 changed files with 17 additions and 2 deletions

View File

@@ -7,15 +7,25 @@ This document explains how to start server (@affine/server) locally with Docker
## Run required dev services in docker compose
Running yarn's server package (@affine/server) requires some dev services to be running, i.e.:
- postgres
- redis
- mailhog
You can run these services in docker compose by running the following command:
```sh
cp ./.docker/dev/compose.yml.example ./.docker/dev/compose.yml
cp ./.docker/dev/.env.example ./.docker/dev/.env
docker compose -f ./.docker/dev/compose.yml up -d
docker compose -f ./.docker/dev/compose.yml up
```
## Build native packages (you need to setup rust toolchain first)
Server also requires native packages to be built, you can build them by running the following command:
```sh
# build native
yarn affine @affine/server-native build
@@ -51,6 +61,8 @@ when server started, it will created a default user for testing:
yarn dev
```
You can login with the user (dev@affine.pro / dev) above to test the server.
## Done
Now you should be able to start developing affine with server enabled.