Skip to content

lucsimao/node-api-template

Repository files navigation

Node Api Template

License: MIT semantic-release Mutation testing badge

A personal uncoupled rest api template using NodeJs and Typescript.

Authors

Summary

Installation

To install this project, run the following commands: git clone https://github.com/lucsimao/node-api-template

Installation

To install this project, run the following commands:

$ git clone https://github.com/lucsimao/testlink-facade-api
  • For npm users
  $ npm install
  $ npm start
  • For yarn users:
$ yarn install
$ yarn start

Elastic Search

Caso o elastic search não funcione no docker, uma configuração do max_map_count pode ser necessária conforme a página oficial do ElasticSearch recomenda.

Para windows

wsl -d docker-desktop
sysctl -w vm.max_map_count=262144

Para Linux

grep vm.max_map_count /etc/sysctl.conf
vm.max_map_count=262144

Para MacOS ou Windows sem WSL

docker-machine ssh
sudo sysctl -w vm.max_map_count=262144

Test

To execute this project tests, you must run the following commands:

  • Unit Tests

    $ npm run test:unit
    

    or

    $ yarn test:unit
    
  • Functional Tests

$ npm run test:functional
$ yarn test:functional
  • Lint
$ npm run lint

or

$ yarn lint
  • Style Check npm run style:check` npm run style:fixoryarn style:check yarn style:fix`

  • All Tests ```npm testoryarn test`

Techs

TypeScript NodeJS Jest GitHub Actions Docker ESLint Visual Studio Code

In this project, we used the following technologies:

References