From 4e79d720df8fce863a37a76a58b27dd7415b7f79 Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Tue, 12 Mar 2024 09:33:52 +0000 Subject: [PATCH] docs(server): update docs for running server locally (#6080) --- docs/developing-server.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/developing-server.md b/docs/developing-server.md index 2c044f25b1..6df00f5fdf 100644 --- a/docs/developing-server.md +++ b/docs/developing-server.md @@ -49,22 +49,18 @@ postgres=# \du ### Set the following config to `packages/backend/server/.env` +In the following setup, we assume you have postgres server running at localhost:5432 and mailhog running at localhost:1025. + +When logging in via email, you will see the mail arriving at localhost:8025 in a browser. + ``` DATABASE_URL="postgresql://affine:affine@localhost:5432/affine" -NEXTAUTH_URL="http://localhost:8080/" -``` - -You may need additional env for auth login. You may want to put your own one if you are not part of the AFFiNE team - -For email login & password, please refer to https://nodemailer.com/usage/using-gmail/ - -``` -MAILER_SENDER= -MAILER_USER= -MAILER_PASSWORD= -OAUTH_GOOGLE_ENABLED="true" -OAUTH_GOOGLE_CLIENT_ID= -OAUTH_GOOGLE_CLIENT_SECRET= +NEXTAUTH_URL="http://localhost:8080" +MAILER_SENDER="noreply@toeverything.info" +MAILER_USER="auth" +MAILER_PASSWORD="auth" +MAILER_HOST="localhost" +MAILER_PORT="1025" ``` ## Prepare prisma