LinksNator
# For clone, don't forget set your secret(ssh) in machine
$ git clone [email protected]:Sbound/linksnator_api.git# access the project using cd command
$ cd linksnator_api# Locally for development
$ npm install# For install on the server, don't forget to use '--prod'
$ npm ci --prod$ yarn --prod# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov# build image
$ sudo docker build -t linksnator_api_image -f Dockerfile .# run
$ sudo docker run -d -p 3000:3000 -t linksnator_api linksnator_api_image# compose
$ docker-compose up -d# pull image
$ sudo docker pull danielguirra/teste:linksnator# run
$ sudo docker run -d -p 80:3000 -p 443:443 --name linksnator danielguirra/teste:linksnator
# compose
$ docker-compose up -d# curl
curl --location 'youriphere.com/link/' \
--header 'api_key: tokenhere' \
--header 'Content-Type: application/json' \
--data '{
"fullLink":"www.gmail.com",
"validity":"2023-10-18T20:23:58.678+00:00"
}'