/demo-param-fetcher-serializer

A demo of ParamFetcher and Serializer for NestJS

Primary LanguageTypeScript

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

$ yarn install

Running the app

# Run docker first to have a database
$ docker compose up -d
# Generate a new migration
$ yarn run typeorm:migration:generate
# launch migration
$ typeorm:migration:run

# development
$ yarn run start

# watch mode
$ yarn run start:dev

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.

Stay in touch

License

Nest is MIT licensed.

Demo

Get "Hello World".

curl http://localhost:3000

Get the person thanks to param-fetcher.

curl http://localhost:3000/3827a8dc-d84d-4711-a934-9da17e859669
curl http://localhost:3000/e5ce4fdb-1a02-44d9-a9cc-26f48bef26ee

Patch the person, after retrieve it with param-fetcher.

curl -X PATCH http://localhost:3000/3827a8dc-d84d-4711-a934-9da17e859669 -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"email": "newEmail@email.local"}'