Alboom Server API

Development server

Run npm run dev or yarn dev for a dev server. Navigate to http://localhost:4000/. The API will automatically reload if you change any of the source files.

Running unit tests

Run npm run test or yarn test to execute the unit tests via Jest.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Production server

Run npm start for a production.

Structure Project

app/
|
|– Configs
|   –environment.js
|   |– Database
|   |   - config.js
|   |– Application
|   |   - config.js
|
|– Docs/
|   |– APIDoc
|   |– JSDoc
|
|– src
|   |- Http
|   |   |- Middlewares
|   |   |    |-Auth
|   |   |       - AuthMiddlewares.js
|   |   |- Routes
|   |   |    |- routes.js
|   |   |- Controllers
|   |   |    |- Domain
|   |   |    |   |- Accounts
|   |   |    |   |   - AccountsController.js
|   |- Database
|   |   |- Models
|   |   |    |- Accounts
|   |   |       - AccountsModels.js
|   |   |    |
|   |- Repositories
|   |   |- Interfaces
|   |   |   - IRepository.js
|   |   |- Domain
|   |   |    |- Accounts
|   |   |    |    |- AccountsRepository.js
|   |- Providers
|   |- Library
|   |   |- Validations
|   |        |- Accounts
|   |           - ValidateDocuments.js
|   |- Helpers

Para teste e2e quando se usa chromium

  • Obter o path do chromium which chromium
  • Exportar a variavel export CHROME_BIN=/usr/bin/chromium