/ze-code-challenge

Solved Zé Delivery back-end-based technical challenge

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

Zé Delivery back-end-based technical challenge

You can see the challenge requirements here

Features
Environment variables
Seeding DB
Running locally
Running tests
Stack
License

Features

  • Partner creation
  • Partner searching by ID
  • Search for nearest partner by coordinates

Environment variables

Remember to create the necessary .env files:

cp -r .env.sample .env
cp -r .env.sample .env.dev

PORT=3030 NODE_ENV="PRODUCTION" MONGODB_USER="user" MONGODB_PASSWORD="password" MONGODB_DATABASE="database" MONGODB_PORT="27017"

Seeding DB

To preload the database with some data:

  • First, remember to build the project to its latest version
pnpm build
pnpm db:seed

You can see the full list of data here

Running locally

Clone the project:

git clone https://github.com/matheustrres/ze-code-challenge

Enter the project directory:

cd ze-code-challenge

Install the necessary dependencies:

pnpm install

Start the server in development mode:

pnpm start:dev

Running tests

To run the existing tests, run the following command:

pnpm test

Stack

  • Node.js
  • Typescript
  • Express
  • MongoDB
  • Mongoose
  • Docker
  • Zod

License

This project is licensed under the GPL 3.0 license.