Skip to content

ViniGB/Project-Blogs-Api

Repository files navigation

Project Blogs Api

  • Project to develop API and Database for a blog content production, creating a posts CRUD, using Node.js and Sequelize package.

Requirements

  1. Create migrations for Users, Categories, BlogPosts, and PostCategories entities ✔️
  2. Create User model ✔️
  3. Create POST endpoint in /login ✔️
  4. Create POST endpoint in /user with JWT token ✔️
  5. Create GET endpoint in /user ✔️
  6. Create GET endpoint in /user/:id ✔️
  7. Create Category model ✔️
  8. Create POST endpoint in /categories ✔️
  9. Create GET endpoint in /categories ✔️
  10. Create BlogPost model ✔️
  11. Create PostCategory Model ✔️
  12. Create POST endpoint in /post ✔️
  13. Create GET endpoint in /post ✔️
  14. Create GET endpoint in /post/:id ✔️
  15. Create PUT endpoint in /post/:id ✔️

Bonus Requirements

  1. Create DELETE endpoint in /post/:id ✔️
  2. Create DELETE endpoint in /user/me ✔️
  3. Create GET endpoint in /post/search?q=:searchTerm ✔️

Language and Tools

mysql MySQL

javascript JavaScript

nodejs Node.js

Get started

With Docker
👉 Dockerfile and Docker-compose were provided by Trybe

⚠️ Before you start, you must check if your docker-compose version is 1.29 or higher

  • Run node and db by running:
$ docker-compose up -d --build
  • Open interactive terminal using:
$ docker exec -it blogs_api bash
  • Install dependencies, inside the container, with:
$ npm install
Install it locally
  • Open terminal and create a directory in your preferred location:
$ mkdir <Your directory name here>
  • Access directory then clone the repository:
$ cd <Your directory name here>
$ git clone git@github.com:ViniGB/Project-Blogs-Api.git
  • Access the newly created directory:
$ cd Project-Blogs-Api
  • Install dependencies:
$ npm install

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages