@softkit/bootstrap
v0.3.0
Published
This library provides a set of general services, methods and utilities for bootstrapping the application. It's configuring default interceptors, swagger, http server, security, etc...
Maintainers
Readme
Bootstrap Library
This library provides a set of general services, methods and utilities for bootstrapping the application. It's configuring default interceptors, swagger, http server, security, etc...
Useful to do not repeat yourself everytime, and shouldn't be used outside Softkit ecosystem
Installation
yarn add @softkit/bootstrapUsage in your main.ts
import { PlatformAppModule } from './your-app.module';
import { bootstrapBaseWebApp } from '@softkit/bootstrap';
void bootstrapBaseWebApp(PlatformAppModule);Usage in tests (e2e)
import { bootstrapBaseWebApp } from '@softkit/bootstrap';
describe('auth e2e test', () => {
let app: NestFastifyApplication;
beforeAll(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [YourAppModule],
}).compile();
app = await bootstrapBaseWebApp(moduleFixture, PlatformAppModule);
});
});Usage cookie
- add the /// line in the global.d.ts file
- update the tsconfig.app.json. Add the "../../global.d.ts" in the include array
- add the cookie secret in the config file.
{
"include": [
"../../global.d.ts"
]
}