/NestJSBackend

Backend written in NestJS, Typescript, connecting to PostgreSQL

Primary LanguageTypeScriptMIT LicenseMIT

Description

Nest framework TypeScript connecting to PostgreSQL.

Installation

$ npm install

Requirements

Have PostgreSQL running locally on port 5432 and have database nestjs-users.
To change connection, modify ormconfig.json.

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

Usage

Use Postman or Insomnia to send API requests:

  • Gets all users from DB
    GET /users

  • Get specific user by email
    GET /users/:email

  • Create new user
    POST /users

{
  user: {
    firstName: string,
    lastName: string,
    email: string,
  }
}
  • Delete user
    DELETE /users/:email

License

MIT licensed.