Here's a back-end oriented assessment that we'd like you to complete in approx one week.
We estimate that this task will take about 6-10 hours of contiguous development. Feel free to develop in a non-contiguous manner.
If you start to go way over time then just submit what you have and create a list in your project's README.md of anything else that would have liked to add/do given the time.
When finished send over the GitHub repo and any other links
You will need to install docker on your machine to get your database working, it is suggested that you use the latest beta version of docker with it's native hosting features for OSX and Windows users.
Provide CURL based examples on how to interact with your API (GET and POST)
The database layer is provided to you via Mongo in a Docker container, the instructions below will start the Mongo 3.3 database on your machine and populate it with sample bike data for your api
API API must output JSON in its responses
You must include installation and setup instructions in your README.md
Please list any other assumptions you may have made
Use any modern language you see fit to get the job done, obviously it will have to work with Mongo 3.3
Feel free to a micro-framework such as Flask (Python), Express (Node), Sinatra (Ruby), Slim (PHP), Goji (Go)
Your application will be assessed on the following criteria (in order of importance):
Approach and thinking
Code organisation, commenting and use of GitHub
Quality of setup instructions in your README.md
Quality of api documentation in your README.md
Maintainability
bonus points If you unit test your models and include test instructions
bonus points If you can host the api code in a public docker container and link it to the Mongo Docker container with instructions
We're trying to see your thought processes with this task. What's more important to us is how you approach the task, rather than the actual final output itself.
To give you an idea of the documents (records) of what's in the Mongo bike collection in the test db. This is a sample schema for bikes, you can add/modify fields as you see fit:
{
"id": 1,
"name": "Litening C:68 super trike",
"description": "The trike for professional 4 year old cyclists. Full carbon frame, complete with novelty horn",
"price": "5006.33"
}
Follow these instructions to get the test database working on your machine:
Ensure you have the latest version of Docker installed on your machine (Native Docker for Windows, and Docker for Mac that no longer use docker-machine) https://docs.docker.com/engine/installation/.
Ensure the docker service is running on your machine and you can connect to it using the docker info command
Get Mongo running as a service on your machine by typing the following commands into a console window.
#A. remove the old instance of the db if it exists, don't worry if this errors
docker rm --force jlmongo
#B. start the Mongo container as a service
docker run -d --name jlmongo -p 27017:27017 jujhars13/dev-test-generalist-mongo:latest
#C. Once the container is up and running. Import the bike schema by running this command in
docker exec jlmongo mongoimport --collection bike /schema/bike.json --jsonArray