Skip to content

stephencatano/mutants-api

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# In local is necessary to comment SSL encryption and DATABASE_URL variable for Database in ORMConfig.js
# // url: DATABASE_URL,

# // ssl: {
# //   rejectUnauthorized: false,
# // },

# set the .env with your environment variables
# after that run migrations with the command
$ npm run migrate

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

# this API is deployed in Heroku, you can test the application with the following cURLs

# healthcheck
$ curl --location 'https://app-mutants-api-0b7cb38c0b33.herokuapp.com/health' \
--header 'trace_id: traceId'

# stats
$ curl --location 'https://app-mutants-api-0b7cb38c0b33.herokuapp.com/stats' \
--header 'trace_id: traceId'

# mutant
$ curl --location 'https://app-mutants-api-0b7cb38c0b33.herokuapp.com/mutant' \
--header 'trace_id: traceId' \
--header 'Content-Type: application/json' \
--data '{
    "dna": ["AAAAAA","AAAAAA","AAAAAA","AAAAAA","AAAAAA","AAAAAA"]
}'

# mutant's examples
$ ["AAAAAA","CAGTGC","TTATTT","AGACGG","GCGTCA","TCACTG"]
$ ["ATGCGA","ATGCGA","ATGCGA","AGACGG","GCGTCA","TCACTG"]
$ ["ATGCGA","CAGTGC","TTATGT","AGAAGG","CCCCTA","TCACTG"]

# human's examples
$ ["ATGCGA","CAGTGC","TTATTT","AGACGG","GCGTCA","TTACTG"]
$ ["ATGCGA","CAGTGC","TTATTT","AGACGG","GCGTCA","TCACTA"]
$ ["ATGCGA","CAGTGC","TTATTT","AGACGG","GCGTCA","TCACTG"]

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Made with Love ♥️

Stay in touch

License

Nest is MIT licensed.