REST API Implementaion of Binary Search Tree (BST) insert operation using Elixir and Plug
422
This repository is the solution for programming test for the role of Student Worker - Software Engineer, Motorola Solutions, Denmark.
The following challenges are addressed in the build:
This build is a REST API implementation of Binary Search Tree (BST) insertion opertation using Elixir and Plug dockerized and deployed with kubernetes on KubeSail available at
https://binary-search-tree.saipranavk.usw1.kubesail.org/
GitHub checks are powered by Travis-CI and the results of the every commit on the repository can be seen at https://travis-ci.com/github/SaipranavK/motorola-student-worker-challenge
##Usage The docker image build can be pulled using the command:
docker pull saipranavk/binary-search-tree
available on DockerHub at https://hub.docker.com/r/saipranavk/binary-search-tree or
To run the docker image use command:
docker run saipranavk/binary-search-tree
or you can directly access the API at https://binary-search-tree.saipranavk.usw1.kubesail.org/
Following are the Endpoints available in the API
GET: "/" - Generic test route to check if the server is running
Response: "Binary Search Tree REST API" with status code 200
POST: "/insert" - Route to create tree/ add new node
Payload: { tree: tree, n: n } where, n is the value to be added. To create a new tree pass tree: null/nil.
Response: tree with status code 200
Content type
Image
Digest
Size
460.2 MB
Last updated
about 6 years ago
docker pull saipranavk/binary-search-tree