|
1 |
| -# Mythril API |
2 |
| -An API built with Flask used to serve content to mythril.io |
| 1 | +<p align="center"> |
| 2 | + <a href="https://mythril.io/" target="_blank" rel="noopener noreferrer"> |
| 3 | + <img width="250" src="https://github.com/mythril-io/mythril-ui/blob/master/src/assets/logo.svg" alt="Mythril logo"></a> |
| 4 | +</p> |
| 5 | +<p align="center"> |
| 6 | + <a href="https://github.com/mythril-io/mythril-api/issues"><img src="https://img.shields.io/github/issues/mythril-io/mythril-api.svg?sanitize=true" alt="Issues"></a> |
| 7 | + <a href="https://discordapp.com/invite/yEbb4B2"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true" alt="Chat"></a> |
| 8 | +</p> |
| 9 | + |
| 10 | +# Description |
| 11 | + |
| 12 | +An API built with [Flask](https://github.com/pallets/flask) used to serve content for [mythril.io](https://mythril.io/). |
3 | 13 |
|
4 | 14 | ## Project setup
|
5 |
| -Setup your virtual environment and install required packages with [pipenv](https://github.com/pypa/pipenv) |
| 15 | +Setup your virtual environment and install required packages with [pipenv](https://github.com/pypa/pipenv). |
6 | 16 | ```
|
7 | 17 | pipenv shell
|
| 18 | +``` |
| 19 | +Create a .env file in the root folder |
| 20 | +``` |
| 21 | +# Flask SQLAlchemy |
| 22 | +SQLALCHEMY_DATABASE_URI= "mysql+mysqlconnector://username:password@localhost:port/database" |
| 23 | +SQLALCHEMY_TRACK_MODIFICATIONS = False |
| 24 | +
|
| 25 | +# Flask Praetorian |
| 26 | +PRAETORIAN_SECRET_KEY = "top secret" |
| 27 | +PRAETORIAN_CONFIRMATION_SENDER = "no-reply@mythril.io" |
| 28 | +PRAETORIAN_CONFIRMATION_URI = "http://localhost/verify" |
| 29 | +
|
| 30 | +# Flask Mail |
| 31 | +# A free service such as Mailtrap can be used for email testing |
| 32 | +MAIL_SERVER = "smtp.mailtrap.io" |
| 33 | +MAIL_PORT = port |
| 34 | +MAIL_USERNAME = "username" |
| 35 | +MAIL_PASSWORD = "password" |
| 36 | +
|
| 37 | +# S3/Digital Ocean Spaces |
| 38 | +DO_SPACES_REGION = region |
| 39 | +DO_SPACES_KEY = key |
| 40 | +DO_SPACES_SECRET = secret |
| 41 | +DO_SPACES_BUCKET= bucket |
| 42 | +``` |
| 43 | +Run your Flask application. |
| 44 | +``` |
8 | 45 | flask run
|
9 | 46 | ```
|
10 | 47 |
|
11 | 48 | ## Database setup
|
12 |
| -Instructions coming soon |
| 49 | +Instructions coming soon. |
0 commit comments