/gobarber-api

:sunglasses: NodeJS GoBarber API

Primary LanguageJavaScriptMIT LicenseMIT

GoBarber API

GoBarber API

Installation

First of all you need to install NodeJS, Yarn, PostgreSQL, MongoDB and Redis

  1. Install all dependencies.

    $ yarn
  2. Create an empty database in postgreSQL with name "gobarber".

  3. Create a .env file into root directory, use .env.example file for env vars keys.

  4. Migrate database.

    $ yarn sequelize db:migrate

Testing

First setup your test env:

  1. Create a .env.test file into root directory, use .env.test.example file for env vars keys.

Now run tests:

$ yarn test

Usage

First you need to start dbs services (PostgreSQL, MongoDB and Redis).

$ yarn queue

and

$ yarn dev

Now api will listen on http://localhost:3333