Submission for the Backend assessment for role of Full Stack Developer at Speer Technologies.
The database used is MongoDB keeping speed and performance in mind along with scaling the DB with increase in users.
To run tests, run the following command
npm run test
What this does is cleans up and injects data into the Testing DB
Clone the project
git clone https://github.com/ananth243/speer-backend.git
Go to the project directory
cd speer-backend
Following are the required environment variables
SECRET_KEY
DBURI
TEST_DBURI
The TEST_DBURI
is a replica of the actual DB for E2E testing.
To run locally, you will need to have Nodejs installed along with MongoDB. Add the above environment variables to your .env file.
If you do not have a MongoDB instance available, you can use the one provisioned by Docker. Refer to the .env.example
file for more information.
Install dependencies
npm install
Start the server (After configuring env variables)
npm start
Build the app
docker build -t speer .
Start the containers
docker compose up --build -d