Still working on this and the accompanying post.
A Django app to create a public API for a private Slack channel's messages.
Check out our Source article explaining how the LA Times uses Slack to create published live chats and how you can make your own.
Create a virtualenv to store the codebase.
$ virtualenv slack_chat
Activate the virtualenv.
$ cd slack_chat
$ . bin/activate
Clone the git repository from GitHub.
$ git clone https://github.com/brizandrew/slack-chat-example.git repo
Enter the repo and install its dependencies.
$ cd repo
$ pip install -r requirements.txt
Make a copy of the .env file to add your own credentials
$ cp .env.template .env
Fill in your Slack app's credentials in the copied env file. You also need a random string for the secret_key
, and once you have a URL for your app fill that out in site_url
.
Make the SQLite file
$ python manage.py migrate
Make a superuser
$ python manage.py createsuperuser
Now run the test server and check out the results on localhost:8000/admin.
$ python manage.py runserver