colinwilliams91 / nest-notes-template

Nest js | OpenAI | Socket-io multiplayer competitive creative writing game
https://secret-stories.vercel.app
0 stars 0 forks source link
nestjs nodejs typeorm typescript

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

<p align="center">

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

-- SOLID -- Nest's Object Oriented Organizational Methodology

Developer Notes:

Ex: To implement new entity/resource with exposed CRUD endpoints

OR

Nest CLI resource generation docs:

Ex: Controller response object exposure

Nest detects when the handler is using either @Res() (<-- injectable decorators -->) or @Next(), indicating you have chosen the library-specific option. If both approaches are used at the same time, the Standard approach is automatically disabled for this single route and will no longer work as expected. To use both approaches at the same time (for example, by injecting the response object to only set cookies/headers but still leave the rest to the framework), you must set the passthrough option to true in the @Res({ passthrough: true }) decorator.

Ex: Docker YAML and start-up

/* YAML docker-compose.yml configuration file */
version: "3"
services:
  db:
    image:  postgres // image to create db
    restart: always
    ports: // `port:port` allows access inside and outside docker
      - "5432:5432"
    environment:
       POSTGRES_PASSWORD: pass123

// Start containers in detached / background mode
docker-compose up -d
// `docker-compose up [db] -d // <-- to start specific `service`
// ...if no services specified, will start all `services` in YAML

// Stop containers
docker-compose down

Testing

Contribution

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

Database

This codebase has a SQL (PostgreSQL & TypeORM) branch && a NoSQL (MongoDB & Mongoose)

SQL

COMMANDS

MORE PSQL CLI COMMANDS

NoSQL:

License

Nest is MIT licensed.