rnanc / gobarber-api

Node Api written in Typescript for GoBarber web and mobile during Rocketseat's Bootcamp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

✂️ GoBarber API ✂️

Requirements

  • PostgreSQL
  • Redis
  • Mongo DB
  • Yarn
  • Node

PostgreSQL

To install it without docker you will have to access PostgreSQL, follow the instructions till the end.

To install with docker, run the command:

$ docker run --name container-name -e POSTGRES_PASSWORD=your-password -p 5434:5434 -d postgres

After the installations is completed, create a database named gostack_gobarber with the GUI of your choices, recommended: pgAdmin or DBeaver.

Cloning and Running Migrations

After cloning the repository, navigate to the backend folder and run the following command on terminal to install dependencies:

$ yarn

Next you'll have to run the following command to run database migrations:

$ yarn typeorm migration:run

Now you can check if the tables were created in your database.

Running the API

To run the API in development settings, type and run the following command on terminal:

$ yarn dev:server

Automated Testing

The API have automated testing in all it's services, to run the tests enter the following command on terminal:

$ yarn test

Related Links

GoBarber Mobile 📱: https://github.com/rnanc/gobarber-app

GoBarber Web 💻: https://github.com/rnanc/gobarber-web

About

Node Api written in Typescript for GoBarber web and mobile during Rocketseat's Bootcamp


Languages

Language:TypeScript 93.2%Language:JavaScript 6.1%Language:Handlebars 0.5%Language:Shell 0.2%