Premise Backend
A Node.js backend to a demo application.
It provides routes for CRUD operations for a dummy demo application with authentication/authorization via Jwt token.
You can pull the docker image at this address: https://hub.docker.com/r/fb040974/premise-backend
A 'MONGO_URL' environment variable for the URL of a running MondoDB instance must be provided. By default, this variable is already set for a free online version of Mongo database at https://www.mongodb.com/. However, as a demo database server, it can stop at any time.
MONGO_URL default value: mongodb+srv://andela:[email protected]/movies_db?authSource=admin&replicaSet=atlas-xljsw6-shard-0&readPreference=primary&appname=MongoDB%20Compass&ssl=true
####File deploy.sh is a complete script with four main tasks:
- build the docker image
- push it to Docker-Hub
- deploy that image for the corresponding Kubernetes cluster set in the machine using kubectl, accordingly to deployment.yml
- config a horizontal autoscaling for pods based on cpu use
####File user.test.js provides a Unit test to check the Jwt build function.