This is a project made for Walmart Chile's challenge.
The project must have:
- Product Search API (using provided products mongo collection).
- Palindrome Special Discount.
- Website with Search and Product Display.
This project was made using the following technologies:
- Backend: https://koajs.com/
- Frontend: https://reactjs.org/
- CSS: https://ant.design/
First you would need https://www.docker.com/get-started on version Docker version 20.10.8, build 3967b7d28e
already installed and https://docs.docker.com/compose/install/ on version docker-compose version 1.29.2
- Docker is the environment where the servers runs.
- There is a MongoDB server running that make the magic happens.
- The backend depends on the MongoDB, it connect on port 27017.
- The frontend is built and served using serve library as server, it run in the port 5000.
The .env
files for backend
and frontend
are loaded on the docker-compose file, but if you wanna run it on locally, these are the needed values:
NODE_ENV=development
PORT=3000
DB_URI=mongodb://productListUser:productListPassword@`YOUR LOCAL IP`:27017/promotions?authSource=admin
REACT_APP_URL=http://localhost:3000
This app can be used as a Website or as an API.
The website would be available at:
The following query will return the results for the palindrome sadfdas
.
Pagination is possible using the page
and perPage
query param.
Can be accessed using the following connection string:
mongodb://productListUser:productListPassword@localhost:27017/promotions?authSource=admin