@@ -26,7 +26,31 @@ Status page: <https://zuzugo.instatus.com/>
26
26
``` bash
27
27
pnpm install
28
28
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
+ ```
29
44
45
+ 3 . Primsa 相關
46
+
47
+ ``` bash
48
+ pnpm prisma generate
49
+ pnpm prixma migrate deploy
50
+ ```
51
+
52
+
53
+ ``` bash
30
54
# start the inngest dev server
31
55
pnpm inngest-dev
32
56
```
@@ -45,11 +69,53 @@ pnpm inngest-dev
45
69
46
70
![ yeah] ( https://1.bp.blogspot.com/-h-sB7bTbyDo/XmerCeUWoCI/AAAAAAAALSU/3DmKLm3ZXh8NUecPNKHB0YCVrUd51MbRQCK4BGAYYCw/s1600/noname.png )
47
71
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
+ ```
49
114
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
53
119
54
120
## License
55
121
0 commit comments