A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
"migration:run": Run migration from migration folder database/migrations
"migration:generate": Generate migration files changes in entity database
"migration:create": Create empty migration file
"migration:revert": Revert the changes
https://stackoverflow.com/questions/72535879/getconnection-getrepository-typeorm-is-deprecated <- remember init datasource
-
CASL: https://mfi.engineering/extensible-and-secure-authorization-with-nestjs-and-casl-c6f6d1ceefd5
-
Suport inheritance role: https://stackoverflow.com/questions/20215744/how-to-create-a-mysql-hierarchical-recursive-query
-
Support retricting fields
-
RBAC: https://medium.com/yavar/casl-roles-with-persisted-permissions-in-nestjs-152129f4a6fb
-
Setup redis in nestjs https://medium.com/@mut1aq/using-redis-in-nestjs-8ca1a009670f (using package cache-manager-redis-yet instead, bc ttl issues)
-
Setup redis docker: https://geshan.com.np/blog/2022/01/redis-docker/
-
Remove cache by key pattern: https://tech.oyorooms.com/finding-and-deleting-the-redis-keys-by-pattern-the-right-way-123629d7730
-
Best practise key for redis:
objectType:objectId:field
: https://www.dragonflydb.io/guides/redis-best-practices
- Ref Implement Migration Typeorm NestJS https://dev.to/amirfakour/using-typeorm-migration-in-nestjs-with-postgres-database-3c75
- https://systemdesign.one/distributed-counter-system-design/ (count something...)
-
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/search_examples.html
-
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html
-
https://viblo.asia/p/tich-hop-elasticsearch-va-kibana-vao-docker-compose-Az45bymqlxY
-
https://docs.nestjs.com/techniques/database#subscribers (Subscriber Database)