Skip to content

RESTful API developed with Node.js, Express.js and Sequelize.js at the end of Unit 24 (Back-end Development Module) of the Trybe's Web Development course

Notifications You must be signed in to change notification settings

raphaelalmeidamartins/blogs-api

Repository files navigation

💻 Blogs API ✍️

cover

📃 About/Sobre

🇺🇸 English

Node.js and Express.js project developed by Raphael Martins at the end of Unit 24 (Back-end Development Module) of Trybe's Web Development course. I was approved with 100% of the mandatory and optional requirements met.

We had to create a blog RESTful API using MSC (Model-Service-Controller) architecture. We must use the Sequelize.js ORM to connect with the database, and handle authentication with Json Web Token.

Click here to check out the final version of the project on your browser.

🇧🇷 Português

Projeto Node.js, Express.js e Sequelize.js desenvolvido por Raphael Martins ao final do Bloco 24 (Módulo Desenvolvimento Back-end) do curso de Desenvolvimento Web da Trybe. Fui aprovado com 100% dos requisitos obrigatórios e opcionais atingidos.

Tivemos que criar uma API RESTful de blog usando a arquitetura MSC (Model-Service-Controller). A conexão com o banco de dados precisou ser feita com o ORM Sequelize e a autenticação com Json Web Token.

Clique aqui para conferir a versão final do projeto no seu navegador.

👨‍💻 Developed Skills/Habilidades Desenvolvidas

🇺🇸 English
  • Create an Express.js application
  • Create a RESTful API using MSC (Model-Service-Controller) architecture
  • Validate requests' data with the Joi library
  • Implement authentication with Json Web Token (JWT)
  • Use the Sequelize.js ORM to connect with the database and perform queries

🇧🇷 Português
  • Criar uma aplicação Express.js
  • Criar uma API RESTful usando arquitetura MSC (Model-Service-Controller)
  • Validar dados das requisições com a biblioteca Joi
  • Implementar autenticação por Json Web Token (JWT)
  • Usar o ORM Sequelize.js para fazer a conexão e queries no banco de dados

🛠️ Tools/Ferramentas

  • Node.js
  • Express.js
  • Sequelize.js
  • Express Rescue
  • Json Web Tokens
  • DotEnv
  • Joi
  • Docker
  • MySQL

🐋 Installation and execution with Docker/Instalação e execução com Docker

🇺🇸 English

To run this application you need to have Git, Docker and Docker Compose installed on your machine. Docker Compose needs to be at 1.29 version or superior.

1 - Clone the repository

git clone https://github.com/raphaelalmeidamartins/blogs-api

2 - Run the containers by running the command below in the application folder

docker-compose up -d --build

3 - Run this command to attach the container to your terminal

docker exec -it blogs_api bash

4 - On the attached container, install the dependencies and run the application

Install the dependencies:

npm install

Run the application:

npm start

5 - Access the documentation and make requests to the server running on the port 3000

Access the route http://localhost:3000/docs/en to see the English documentation and try the API. If you prefer, you can use a HTTP requests client of your choice (Insomnia, Thunder Client, etc) to make requests.


🇧🇷 Português

Para rodar está aplicação é necessário ter Git, Docker e o Docker Compose instalados no seu computador. O Docker Compose precisa estar na versão 1.29 ou superior.

1 - Clone o repositório

git clone git@github.com:raphaelalmeidamartins/blogs-api.git

2 - Rode os containers executando o comando abaixo na pasta raiz da aplicação

docker-compose up -d --build

3 - Rode o comando para abrir o terminal do container blogs_api

docker exec -it blogs_api bash

4 - No terminal do container, installe as dependências e execute a aplicação

Instalando dependências:

npm install

Executando aplicação:

npm start

5 - Acesse a documentação e faça requisições para o servidor aberto na porta 3000

Acesse a rota http://localhost:3000/docs/br para acessar a documentação em português e testar a API. Se preferir, utilize um cliente de requisições HTTP de sua preferência (Insomnia, Thunder Client, etc) para fazer as requisições.


📚 Documentation/Documentação

🇺🇸 English

With the application running, enter the http://localhost:3000/docs/en route on your browser to see the English documentation. If you prefer, checkout the deploy on Heroku

🇧🇷 Português

Com a aplicação em execução, acesse a rota http://localhost:3000/docs/br no navegador para ver a documentação em português. Se preferir, acesse o deploy no Heroku.

🏆 Grade/Nota

My grade of the project - Minha nota no projeto

About

RESTful API developed with Node.js, Express.js and Sequelize.js at the end of Unit 24 (Back-end Development Module) of the Trybe's Web Development course

Topics

Resources

Stars

Watchers

Forks