Skip to content

Commit

Permalink
chore(server): update env example and docs (toeverything#9153)
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlewind committed Dec 13, 2024
1 parent ea746e3 commit edd1697
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 7 additions & 6 deletions docs/developing-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -16,24 +16,25 @@ 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
```

## Start server

```
```sh
yarn dev
```

Expand All @@ -45,7 +46,7 @@ when server started, it will created a default user for testing:

## Start frontend

```
```sh
# at project root
yarn dev
```
Expand All @@ -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
```
4 changes: 3 additions & 1 deletion packages/backend/server/.env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# DATABASE_URL="postgres://affine:affine@localhost:5432/affine"
# REDIS_SERVER_HOST=localhost
# COPILOT_FAL_API_KEY=YOUR_KEY
# COPILOT_OPENAI_API_KEY=YOUR_KEY

# MAILER_HOST=localhost
# MAILER_HOST=127.0.0.1
# MAILER_PORT=1025
# MAILER_SENDER="[email protected]"
# MAILER_USER="[email protected]"
Expand Down

0 comments on commit edd1697

Please sign in to comment.