Skip to content

πŸ₯” Application for managing user meals. It allows users to create, edit, and list meals while providing meal-related metrics.

Notifications You must be signed in to change notification settings

lui7henrique/daily-diet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍏 Daily Diet API

The Daily Diet API is an application developed as part of Challenge 02 of the "Creating RESTful APIs with Node.js" module.

πŸ“‹ Rules

  • It must be possible to create a user
  • It must be possible to identify the user in requests
  • It must be possible to register a meal, with the following information:
    • Meals must be related to a user
    • Name
    • Description
    • Date and Time
    • Is it within the diet or not
  • It must be possible to edit a meal, being able to change all the above data
  • It must be possible to delete a meal
  • It must be possible to list all meals of a user
  • It must be possible to view a single meal
  • It must be possible to retrieve a user's metrics
    • Total number of registered meals
    • Total number of meals within the diet
    • Total number of meals outside the diet
    • Best sequence of meals within the diet
  • The user can only view, edit, and delete the meals that he created

πŸš€ How to run:

  1. Clone the repository:

    $ git clone https://github.com/your-username/daily-diet-api.git
  2. Access the project folder:

    $ cd daily-diet-api
  3. Install the dependencies:

    $ npm install
  4. Configure the environment variables in a .env file:

    # Example environment variables
    NODE_ENV=development
    DATABASE_CLIENT=sqlite
    DATABASE_URL=./db/dev.sqlite3
  5. Run the database migrations:

    $ npx knex migrate:latest
  6. Start the server:

    $ npm start

Now, the Daily Diet API is up and running, ready for use.

πŸ‘¨β€πŸ’» Author

Luiz Henrique - Software Developer

Linkedin | E-mail

This project was developed as part of Challenge 02 of the "Creating RESTful APIs with Node.js" course at Rocketseat. πŸš€πŸ“š

About

πŸ₯” Application for managing user meals. It allows users to create, edit, and list meals while providing meal-related metrics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published