Giter Site home page Giter Site logo

blogstate-api's Introduction

⚡ BlogState API

This is an under-development API for BlogState, built in Falcon, and peewee ORM for database interactions.

Setting it up

If you plan to contribute, below are the steps you need to follow.

➡️ Fork, and clone the repository.

If you have SSH keys, use -

    $ git clone [email protected]:<username>/blogstate-api

If you don't, use HTTPS instead -

    $ git clone https://github.com/<username>/blogstate-api

where, <username> is your own GitHub username.

➡️ Navigate to project root

Next, cd blogstate-api/ to get inside the project directory.

➡️ Create and activate a virtual environment (optional / recommended)

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

➡️ Install the requirements:

(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.

➡️ Run the development server

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.

Testing endpoints

You may use httpie or curl for a CLI, or a GUI alternative like Postman or Insomnia to test the necessary endpoints.

blogstate-api's People

Contributors

roshnet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.