chore(server): update env example and docs (#9153)

This commit is contained in:
doodlewind
2024-12-13 11:04:08 +00:00
parent ea746e3d77
commit edd169720b
2 changed files with 10 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ This document explains how to start server (@affine/server) locally with Docker
## Run required dev services in docker compose
```
```sh
cp ./.docker/dev/compose.yml.example ./.docker/dev/compose.yml
cp ./.docker/dev/.env.example ./.docker/dev/.env
@@ -16,16 +16,17 @@ docker compose -f ./.docker/dev/compose.yml up -d
## Build native packages (you need to setup rust toolchain first)
```
```sh
# build native
yarn workspace @affine/server-native build
```
## Prepare dev environment
```
```sh
cd packages/backend/server
# uncomment all env variables here
cp .env.example .env
yarn prisma db push
yarn data-migration run
@@ -33,7 +34,7 @@ yarn data-migration run
## Start server
```
```sh
yarn dev
```
@@ -45,7 +46,7 @@ when server started, it will created a default user for testing:
## Start frontend
```
```sh
# at project root
yarn dev
```
@@ -58,7 +59,7 @@ Now you should be able to start developing affine with server enabled.
### Enable prisma studio (Database GUI)
```
```sh
# available at http://localhost:5555
yarn prisma studio
```