Giter Club home page Giter Club logo

blogs-api's Introduction

1667125615708

About

Application in Node.js using the sequelize package to make a CRUD of posts.

Endpoints are connected to a database following Rest principles.

The relationship between user and post is worked, so user and login are required. each post belongs to one or more categories, thus working the relationship between post and category.

Route protection with jwt token is also worked.

Learnings

  • Structuring an application in layer
  • Delegate specific responsibilities to this layer
  • Understand and apply REST standards
  • Write signatures for intuitive and easily understandable APIs.
  • work with user authentication with jwt
  • validations of data received through joi

Technologies Used

JavaScript  NodeJS  Express.js  Sequelize  ESLint  Git Markdown  Docker  Swagger  JWT

Installation

  • Clone the repository
[email protected]:SamuelS00/Blogs-Api.git
  • After cloning the repository, install the dependencies:
yarn install

or

npm install
  • Then proceed with the creation of your .Env file to store your environment variables, just like:
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=root
MYSQL_DATABASE=blogs_api
PORT=3000

Docker

  • Before you start, your docker-compose needs to be at version 1.29 or higher. See here or in the documentation how to install it. In the first article, you can replace where you are with 1.26.0 with 1.29.2.
  • to run the application containers use the command below:
docker exec -it store_manager bash
  • From here you can run the blogs_api container via CLI or open it in VS Code:
docker exec -it blogs_api bash

Usage

  • run prestart command to populate the tables in the database:
npm run prestart
  • to run the application use the command below:
npm start

or

yarn test
  • to run all tests use the command below:
npm test

Documentation

1667127216928

blogs-api's People

Contributors

iagopferreira avatar samuels00 avatar trybe-tech-ops avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.