Skip to content

Commit 2d5e6c9

Browse files
committed
docs: update READMD
1 parent a00263d commit 2d5e6c9

File tree

1 file changed

+70
-4
lines changed

1 file changed

+70
-4
lines changed

README.md

+70-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,31 @@ Status page: <https://zuzugo.instatus.com/>
2626
```bash
2727
pnpm install
2828
cp .env.example .env
29+
```
30+
31+
2. 更新 .env
32+
33+
```
34+
SLACK_CLIENT_ID=
35+
SLACK_CLIENT_SECRET=
36+
SLACK_REDIRECT_URI=
37+
38+
# 開發可以先關掉
39+
DISABLE_CRON=true
40+
41+
# 記得先 createdb zuzugo-dev
42+
DATABASE_URL=postgres://postgres@localhost:5432/zuzugo-dev?schema=public
43+
```
2944

45+
3. Primsa 相關
46+
47+
```bash
48+
pnpm prisma generate
49+
pnpm prixma migrate deploy
50+
```
51+
52+
53+
```bash
3054
# start the inngest dev server
3155
pnpm inngest-dev
3256
```
@@ -45,11 +69,53 @@ pnpm inngest-dev
4569

4670
![yeah](https://1.bp.blogspot.com/-h-sB7bTbyDo/XmerCeUWoCI/AAAAAAAALSU/3DmKLm3ZXh8NUecPNKHB0YCVrUd51MbRQCK4BGAYYCw/s1600/noname.png)
4771

48-
## Slack setup
72+
## Slack App setup
73+
74+
1. Go <https://api.slack.com/apps?new_app=1> to create a new app from manifest
75+
2. Use the following manifest (TBD)
76+
77+
```json
78+
{
79+
"display_information": {
80+
"name": "zuzugo"
81+
},
82+
"features": {
83+
"bot_user": {
84+
"display_name": "zuzugo",
85+
"always_online": true
86+
},
87+
"slash_commands": [
88+
{
89+
"command": "/zuzugo",
90+
"url": "https://your-zuzugo-domain/api/slack",
91+
"description": "zuzugo commands!",
92+
"should_escape": false
93+
}
94+
]
95+
},
96+
"oauth_config": {
97+
"redirect_urls": [
98+
"https://your-zuzugo-domain/api/slack/oauth_redirect",
99+
"https://your-zuzugo-domain/api/auth/callback/slack"
100+
],
101+
"scopes": {
102+
"bot": [
103+
"commands"
104+
]
105+
}
106+
},
107+
"settings": {
108+
"org_deploy_enabled": false,
109+
"socket_mode_enabled": false,
110+
"token_rotation_enabled": false
111+
}
112+
}
113+
```
49114

50-
1. Go to <https://zuzugo.tunnelto.dev/api/slack/install>
51-
2. Click `Add to Slack channel`, select the channel you want to receive the notification
52-
3. Check the database, you should see SlackAppInstallation table has a new record
115+
1. Go to <https://your-zuzugo-domain/api/slack/install>
116+
1. Click `Add to Slack channel`, select the channel you want to receive the notification
117+
1. Finish Oauth login
118+
1. Check the database, you should see SlackAppInstallation table has a new record
53119

54120
## License
55121

0 commit comments

Comments
 (0)