From 79ef8c3ff8ba686600de69a9af4d6b078f5d3261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=8E=E5=A3=B0?= Date: Mon, 14 Oct 2024 18:18:59 +0800 Subject: [PATCH] docs: update contributing documentation (#8486) --- .devcontainer/build.sh | 3 --- docs/developing-server.md | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index d58c4f457f..097273e020 100644 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -13,6 +13,3 @@ yarn workspace @affine/server-native build # Create database yarn workspace @affine/server prisma db push - -# Create user username: affine, password: affine -echo "INSERT INTO \"users\"(\"id\",\"name\",\"email\",\"email_verified\",\"created_at\",\"password\") VALUES('99f3ad04-7c9b-441e-a6db-79f73aa64db9','affine','affine@affine.pro','2024-02-26 15:54:16.974','2024-02-26 15:54:16.974+00','\$argon2id\$v=19\$m=19456,t=2,p=1\$esDS3QCHRH0Kmeh87YPm5Q\$9S+jf+xzw2Hicj6nkWltvaaaXX3dQIxAFwCfFa9o38A');" | yarn workspace @affine/server prisma db execute --stdin diff --git a/docs/developing-server.md b/docs/developing-server.md index 2fc659a79d..5f01085e8c 100644 --- a/docs/developing-server.md +++ b/docs/developing-server.md @@ -29,7 +29,7 @@ docker run --rm --name mailhog -p 1025:1025 -p 8025:8025 mailhog/mailhog ``` docker ps -docker exec -it CONTAINER_ID psql -U postgres ## change container_id +docker exec -it affine-postgres psql -U postgres ## `affine-postgres` is the container name from the previous step ``` ### in the terminal, following the example to user & table @@ -96,6 +96,12 @@ yarn workspace @affine/native build yarn workspace @affine/server dev ``` +when server started, it will created a default user: + +email: dev@affine.pro +name: Dev User +password: dev + ## start core (web) ```