Skip to content

API that allows you to control different stocks of coffees.

License

Notifications You must be signed in to change notification settings

alisonamerico/coffee-stock

Repository files navigation

coffee-stock

API that allows you to control different stocks of coffees.

coffee

Application available at:

https://coffe-stock.herokuapp.com/rest-auth/login/

https://coffe-stock.herokuapp.com/api/

Python 3 Updates Build Status codecov

Processes used in project development:

Continuous Delivery:

  • Integration with Pipenv Travis and Pyup

  • Automatic Deploy

  • Pytest: To set up and build automated tests for Django.

  • Codecov: For Test Coverage

  • python-decouple: To decouple application instance settings.

How to install locally:

git clone https://github.com/alisonamerico/coffee-stock
cd coffee-stock
cp contrib/env-sample .env

Prerequisite Installed:

  • Docker
  • Docker Compose

For Linux(Ubuntu): https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-engine---community-1

For Mac: https://docs.docker.com/docker-for-mac/install/

For Windows: https://docs.docker.com/docker-for-windows/install/

We can’t run a Docker container until it has an image so let’s do that by building the image for the first time.

docker build .

Create migrations:

docker-compose run web python manage.py makemigrations

Apply migrations:

docker-compose run web python manage.py migrate

Create SuperUser:

docker-compose run web python manage.py createsuperuser

Inform:

 - username
 - email
 - password

We’re finally ready to run Docker itself! The first time you execute the command might take a while as Docker has to download all the required content. But it will cache this information so future spinups will be much faster:

docker-compose up

List the urls that exist

http://0.0.0.0:8000/api/

API Root

http://0.0.0.0:8000/api/harvest
http://0.0.0.0:8000/api/stock

Note: But to view, you must first have:

 - username
 - email
 - password

which generates a token.

url to login:

http://0.0.0.0:8000/rest-auth/login/

When you’re done, don’t forget to close down your Docker container.

docker-compose down

Run the tests:

pytest coffee --cov=coffee

About

API that allows you to control different stocks of coffees.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published