Requirements python 2.7 or python 3.5.
pip install -r requirements.txt
- Copy
config.py.sampletoconfig.py:cp config.py.sample config.py - Create Raco API Application here, with redirect url
http://localhost:5001/login/authorized(or whatever url your server is running in) - Replace client secret and client id in
config.py
Optionally you can set environment variables instead. You would need the folling environment variables defined:
- secret_key: Web server random secret key.
- consumer_key: Your app
client_key. - consumer_secret: Your app
client_secret.
- Set DEBUG to False in config.py
- Create a random secret key.
- Optional: You can create a random key by using the following python code
import os
os.urandom(24)You can easily start the server with python app.py.
In production, you should use something like Gunicorn to serve this. You can run the app with gunicorn -b :<PORT> -w <number of workers> wsgi.
With the above button you can deploy straight to Heroku. When deploying you will need to set the secret key, consumer key and consumer secret, as described above in the configuration section. Make sure that the redirect url for your API application points to ỳour-herokuapp-name.herokuapp.com (replacing your-herokuapp-name with whatever is your Heroku application name).
Made with <3 in Barcelona