diff --git a/README.md b/README.md index 41c7ed2..a07d8be 100644 --- a/README.md +++ b/README.md @@ -49,14 +49,15 @@ REACT_APP_SLACK_CLIENT_ID = ```
- Now, complete the file with the requested information:
- +
Because Slack Api requires an https connection, we recomend you to use ngrok in case you want run it locally
``` -REACT_APP_SLACK_REDIRECT_URL = https://yourFrontend.com/api/v1/auth/slack +REACT_APP_SLACK_REDIRECT_URL = https://example-94-61-25-158.ngrok.io/api/v1/auth/slack REACT_APP_API_BASE_URL = http://localhost:8000 (to run it locally) -``` +``` + -- Add the name of your organization
+
- Then, add the name of your organization
```
REACT_APP_ORGANIZATION_NAME =
@@ -69,20 +70,23 @@ In `server/.env`:
SLACK_CLIENT_ID =
SLACK_CLIENT_SECRET =
-FRONTEND_HOST = https://yourFrontend.com
+FRONTEND_HOST = https://example-94-61-25-158.ngrok.io
SLACK_OAUTH_TOKEN =
SLACK_API_TOKEN =
+SLACK_SCHEDULED_HOURS = 23
+SLACK_SCHEDULED_MINUTES = 59
+
CUCKOOS_URL = cuckoos.io
```
`SLACK_CLIENT_ID` and `SLACK_CLIENT_SECRET` can be found on Basic Information/App Credentials.
- ##
+##
To get these tokens (`SLACK_OAUTH_TOKEN` and `SLACK_API_TOKEN`) you need to install the App on your workspace.
For that, go to Settings/OAuth & Permissions and follow the next steps:
-- Add a **Redirect URL** that should be something like: 'https://yourFrontend.com/api/v1/auth/slack'
+- Add the **Redirect URL** (`REACT_APP_SLACK_REDIRECT_URL`)
@@ -97,22 +101,45 @@ Now you can paste the generated tokens to the file `server/.env`:
```
SLACK_OAUTH_TOKEN = User OAuth Token
SLACK_API_TOKEN = Bot User OAuth Token
+```
+
+##
+
+In `server/config/initializers/cors.rb` add your fontend url to **origins**.
+
+```Ruby
+Rails.application.config.middleware.insert_before(0, Rack::Cors) do
+ allow do
+ origins 'https://example-94-61-25-158.ngrok.io'
+ resource '*',
+ headers: :any,
+ expose: ['Authorization'],
+ methods: %i[get
+ post
+ put
+ patch
+ delete
+ options
+ head]
+ end
+end
```
##
+
-- Install Docker on your computer
+- Run Docker
+- Open cuckoo directory on terminal
- Run App `$ docker-compose up` -- Update Gemfile with new gems and install those gems - `$ docker-compose build` -Cuckoo is licensed under MIT. Refer to LICENSE.txt for more information.