Skip to content

Sbound/linksnator_api

Repository files navigation

Description

LinksNator

Clone

# For clone, don't forget set your secret(ssh) in machine
$ git clone [email protected]:Sbound/linksnator_api.git

Installation

# 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

Running the app

# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov

Docker not Logged

# 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

Docker Logged

# 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

Docker Testing

# 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"
}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published