@smartsoft001/nestjs-stack
@smartsoft001/nestjs-stack installs the server side: the shared module, MongoDB access, the CRUD and auth shells, and the core packages they build on.
Install
npm install @smartsoft001/nestjs-stack
What it is
It ships no code of its own, only pinned dependencies.
Payment providers are deliberately not here: a service that does not take payments should not install four provider SDKs. They live in payments-stack.
Usage
After installing, configure the shared module once in the application module:
import { Module } from '@nestjs/common';
import { SharedModule } from '@smartsoft001/nestjs';
@Module({
imports: [
SharedModule.forRoot({
tokenConfig: {
secretOrPrivateKey: 'change-me',
expiredIn: 3600,
},
permissions: {
create: ['admin'],
read: ['admin', 'user'],
update: ['admin'],
delete: ['admin'],
},
db: {
host: 'localhost',
port: 27017,
database: 'my-app',
},
}),
],
})
export class AppModule {}
API
None of its own. The package is a manifest with pinned dependencies, so what it brings is its whole interface:
| Package |
|---|
@smartsoft001/core |
@smartsoft001/nestjs |
@smartsoft001/mongo |
@smartsoft001/crud-shell-nestjs |
@smartsoft001/auth-shell-nestjs |
Every version is pinned exactly, so the set installs at one version and a release never leaves two of these packages on different ones.
Related packages
The endpoints this stack generates are documented under CRUD.