This is an under-development API for BlogState, built in Falcon, and peewee ORM for database interactions.
If you plan to contribute, below are the steps you need to follow.
If you have SSH keys, use -
$ git clone git@github.com:<username>/blogstate-apiIf you don't, use HTTPS instead -
$ git clone https://github.com/<username>/blogstate-apiwhere, <username> is your own GitHub username.
Next, cd blogstate-api/ to get inside the project directory.
To create a virtual environment, run:
$ python3 -m venv venv
(or use virtualenv instead).
To activate it in Linux-based systems -
$ source venv/bin/activate
To activate it in Windows -
$ \venv\Scripts\activate.bat
(venv) $ pip install -r requirements.txt
Feel free to use pipenv too. Because pipenv is slow, it's better to manually create and activate a virtual environment, and install the requirements.
A gunicorn server is used to serve the app.
(venv) $ gunicorn index:app --reload
This starts the server at http://localhost:8000 by default. The --reload flag enables hot reloads, i.e. it restarts the server on any file changes.
You may use httpie or curl for a CLI, or a GUI alternative like Postman or Insomnia to test the necessary endpoints.