About • Features • API Routes • How it works • Tech Stack • Author
Daily Diet API - Second challenge of Ignite's updated Node.js trail, API that allows you to manage your meals
- Sign Up
- Sign In
- JWT Authentication
- List all meals of a user
- Filter one unique meal with ID
- Add meals
- Update meals
- Delete meals
- View your user metrics
- Persist data in Postgres database with docker
- Users
- POST /users - Create a new user
- POST /users/signin - Sign in and generate JWT
- GET /users - Get your user metrics require a Bearer Token in the req's header
- Meals - All routes require a Bearer Token in the req's header
- GET /meals - List all meals of your user
- GET /meals/:id - See a specific meal of your user
- POST /meals - Create a new meal
- PATCH /meals/:id - Update one of yours meals
- DELETE /meals/:id - Delete one of yours meals
Before you begin, you will need to have the following tools installed on your machine: Git, Node.js. In addition, it is good to have an editor to work with the code like VSCode and a REST client like Insomnia
it is very important that before running the project you configure the environment variables as indicated in the file: .env.example
# Clone this repository
$ git clone https://github.com/Artur-Poffo/02-Daily-Diet-API-Ignite.git
# Access the project folder cmd/terminal
$ cd 02-Daily-Diet-API-Ignite
# install the dependencies
$ npm install
# With your database running and conected:
$ npx prisma migrate dev
# Run the application in development mode
$ npm run dev
# The server will start at port: 3333 - You can now test in Insomnia or another REST client: http://localhost:3333
The following tools were used in the construction of the project:
- Node.js
- TypeScript
- tsx
- tsup
- Fastify
- bcrypt
- zod
- prisma
See the file package.json
- Artur Poffo - Developer