Bun Native
Built from the ground up for Bun runtime. Uses Bun.serve(), Bun.password, and native TCP sockets for maximum performance.
Fast, modular, and fully optimized for the Bun runtime
import { BunFactory, Module, Controller, Get, Injectable } from '@galaxy-stack/orbit-core';
@Injectable()
class UserService {
getUsers() {
return [{ id: 1, name: 'John' }];
}
}
@Controller('users')
class UserController {
constructor(private userService: UserService) {}
@Get()
findAll() {
return this.userService.getUsers();
}
}
@Module({
controllers: [UserController],
providers: [UserService],
})
class AppModule {}
const app = await BunFactory.create(AppModule);
await app.listen(3000);| Feature | Orbit | NestJS |
|---|---|---|
| Runtime | Bun (native) | Node.js |
| HTTP Server | Bun.serve() | Express/Fastify |
| Password Hashing | Bun.password | bcrypt |
| Microservices | Native TCP | External libs |
| Cold Start | ~10ms | ~100ms |
| Memory Usage | Lower | Higher |
Orbit is a monorepo with 32 packages organized by functionality: