adowdy / nestjs-crud-app-graph

test nestjs user crud with graph traversal of user relations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Crud App Example with Users! Users have relations.

Notes:

  • I installed nvm, targeted node 16.16.x,
  • followed hello world process for nest.js project
  • utilized nest cli to generate user resource nest g resource users
  • crud stubs, filled in with a basic JSON file stand in for an ORM interface/DB
  • containerized the test app using Dockerfile
  • wrote dumb script to mount my source into container for hot reload
  • proceeded to adjust user controller (http interface) -> user service (biz logic)
  • installed "Thunder client" to do some really basic testing via localhost:3000 http
  • extra testing focused around user.controller.ts -> @Get('/dist/:startId/:destId') to implement 'distance'

The rest of this is a boilerplate README from nest.js project initialization

Nest framework TypeScript starter repository.

Installation

$ npm install

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

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.

About

test nestjs user crud with graph traversal of user relations


Languages

Language:TypeScript 89.8%Language:JavaScript 6.2%Language:Shell 2.8%Language:Dockerfile 1.3%