Code Monkey home page Code Monkey logo

hr-rest-api's Introduction

RESTful API for our Human Resources Database ๐Ÿ•˜ - ๐Ÿ•”

Documentation Maintenance Coverage License: MIT Twitter: JavierFeliuA

RESTful API for performing CRUD operations in our Human Resources database. The API was coded in Python using Flask, Flask-RESTful, SQLAlchemy, and Flask-JWT. For testing, I used UnitTest.

How to use in development

Clone the repository:

git clone https://github.com/wanderindev/hr-rest-api.git
cd hr-rest-api

Start the application with docker-compose:

docker-compose up --build

This will create a database container, a RESTful API container, a backend network, and a volume mapping the ./rest directory in the repository with the working directory in the container.

Running tests

From PyCharm, right-click in the tests/system or tests/unit directory and select "Run tests with Coverage" to run either system or unit tests.

Testing with Postman

Clone the postman-hr-rest-api repository:

git clone https://github.com/wanderindev/postman-hr-rest-api.git

Open Postman and import hr-rest-api.json and hr-rest-api-environment.json.

Click on Runner.

In the window that pops open, select the hr-rest-api collection and the hr-rest-api environment.

Click on Run.

Deployment

Modify rest/Dockerfile_prod, adding the correct values for the environment variables.

Build the container image and push to Docker Hub:

cd rest
docker build -t wanderindev/hr-rest -f Dockerfile_prod .
docker push wanderindev/hr-rest

Go to the do-managed-kubernetes repository and re-deploy the pod.

kubectl delete deployment hr-rest
kubectl apply -f ./sites/hr-rest.yml

Author

๐Ÿ‘ค Javier Feliu

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

Copyright ยฉ 2019 Javier Feliu.

This project is MIT licensed.


I based this README on a template generated with โค๏ธ by readme-md-generator

hr-rest-api's People

Contributors

wanderindev avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

submergedduck

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.