muneeb21 / nest-api

Repository from Github https://github.communeeb21/nest-apiRepository from Github https://github.communeeb21/nest-api

Description

Nest api for contact webservice.

  • Tech stack used: Postgresql, Nestjs, Nodejs and Typescript

Software Requirements to run app

$ postgres
$ node
$ docker

Running the app

# Using docker
 - setup your postgres credentials in .env file
 - Go to root directory of project and run
   $ docker build -t nest-api .
   $ docker run -p 3000:3000 nest-api

 # Alternate method to run api
 - install node version 16
 - run npm i in root directory
 - setup your postgres credentials in .env file
 -  npm run start:dev

$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Api Details

# Url
$ localhost:3000/identify
# curl

curl --location --request POST 'localhost:3000/identify' \
--header 'Content-Type: application/json' \
--data-raw '{
	"email": "mcfly@hillvalley.edu",
	"phoneNumber": "123456"
}'

About


Languages

Language:TypeScript 99.8%Language:JavaScript 0.2%