Skip to content

rannisim/resource-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#RESOURCE NODE

This resource node can save a single object and replicate the result to one more pre-defined instance

Setup

This was built using Python, Flask and Invoke.

This project requires the following:

  1. docker
  2. docker-compose
  3. Python 3.7

To start the project locally run the following

  1. Create a virtual python env
$ virtualenv -p python3.7 venv
$ source venv/bin/activate
  1. Setup the required python packages
$ pip install -r requirements-dev.txt -r requirements.txt
  1. Check that everything is working
inv test

Which will build the docker image start the docker compose and run all tests.

APIs

Health Check

Path: /api/healthcheck Method: GET

Should return 200 if the service is healthy

Resoruce - read

Path: /api/resource Method: GET

Returns 200 on success and the saved object if there is one.

Resoruce - save

Path: /api/resource Method: POST Request Body: Any valid json you want

Returns 200 on success

Tests

Unit

Verify single class logic

Integration

Tests classes which interact with external components

Component

Runs local end to end tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published