Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

doodlewindedd169720b75
diff --git a/docs/developing-server.md b/docs/developing-server.md
index c09064216b..c854910170 100644
--- a/docs/developing-server.md
+++ b/docs/developing-server.md
@@ -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
```
diff --git a/packages/backend/server/.env.example b/packages/backend/server/.env.example
index b7adcf56c9..2a56e69bf6 100644
--- a/packages/backend/server/.env.example
+++ b/packages/backend/server/.env.example
@@ -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]"