Skip to content

sample async nestjs app listenning to post and get endpoints

Notifications You must be signed in to change notification settings

danilomr12/http_post_generic_listener

Repository files navigation

HTTP POST GENERIC LISTENER

This is a simple rest application built with nestjs with purpose of simply receive HTTP POST request with json body on two generic endpoints.

Description

One endpoint accepts a list of any objects. The other accept a single object; By changing the vars at the .env file, the endpoints are dynamically changed;


BASE_PATH - subdirectory of the full path. Can be blank

OBJECT_PATH - endpoint that accepts single-object

LIST_PATH - endpoint that accepts a list of objects

EXPOSED_PORT - port exposed by our docker container

sample of final url:

Running with docker

make sure you have GNU Make and docker installed;

# build the docker image with productoin target
make build
# run the docker image built locally. Needs run make build first
make run

Installation

npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

About

sample async nestjs app listenning to post and get endpoints

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published