@bunito/bunito
v0.0.14
Published
Main application entrypoint for the Bun-first bunito framework.
Maintainers
Readme
@bunito/bunito
Main application entrypoint for bunito.
Use this package for the core application APIs: App, modules, providers,
configuration, and logging.
Installation 📦
bun add @bunito/bunitoUsage ✨
import { App, Logger, LoggerModule, Module, Provider } from '@bunito/bunito';
@Provider({
injects: [Logger],
})
class HelloService {
constructor(private readonly logger: Logger) {}
sayHello(): void {
this.logger.info('Hello from bunito');
}
}
@Module({
imports: [LoggerModule],
providers: [HelloService],
})
class AppModule {}
const app = await App.start(AppModule);
const hello = await app.resolve(HelloService);
hello.sayHello();
await app.shutdown();License
MIT
