Skip to content

This part of a coding challenge that I've made for Waltmart (chile)

Notifications You must be signed in to change notification settings

Esequiel378/walmart-challenge-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Walmart challenge - API backend

Code style: black

Description

Backend connection for a demo Lider web app built with Docker, FastAPI, mongoDB and Traefik as reverse proxy

Here you will find a really nice Web App to interact with, also a quick Deployment solution

Live demo lider.co

Setup

This project need a .env file in the root directory, with the next variables

DATABASE_HOST=database
DATABASE_USERNAME=root
DATABASE_PASSWORD=secret

DATABASE_URI=mongodb://root:secret@database:27017
DATABASE_NAME=desafio_walmart

Deployment

First you need to get the source code

git clone https://github.com/Esequiel378/walmart-challenge-backend.git

Since the project use docker-compose, you can deploy locally by running

# build api and database images
docker-compose -f local.yml build

# create api and database containers
docker-compose -f local.yml up

Now you can visit http://localhost:5000/docs to view de api documentation

Or if your in a production environment run

# build api and database images
docker-compose -f production.yml build

# create api and database containers
docker-compose -f production.yml up

Now you can visit your server ip/domain at the /docs endpoint or http://localhost/docs to view de api documentation

Testing

You can find more about testing with FastAPI here

make test

Run coverage

make coverage

Related Projects

TODO

  • Implement integration tests

  • Improve database entry search

  • Improve unit tests with 100% coverage goal

About

This part of a coding challenge that I've made for Waltmart (chile)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published