File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { defaultOptions } from "../utils/constants";
44import { controllerMetadata , routeMetadata } from "../utils/meta-data" ;
55import { Container } from "../di/Container" ;
66
7- export class Server {
7+ export class Application {
88 private readonly app : Hono ;
99 private readonly options : ServerOptions ;
1010
@@ -13,8 +13,8 @@ export class Server {
1313 this . options = { ...defaultOptions , ...options } ;
1414 }
1515
16- public static create ( app : Hono , options : ServerOptions ) : Server {
17- const instance = new Server ( app , options ) ;
16+ public static initialize ( app : Hono , options : ServerOptions ) : Application {
17+ const instance = new Application ( app , options ) ;
1818 instance . registerControllers ( ) ;
1919 return instance ;
2020 }
Original file line number Diff line number Diff line change 1- import { Server } from './core/Server ' ;
1+ import { Application } from './core/Application ' ;
22import type { ServerOptions } from './types' ;
33
44// -------------------------------------------------------------------------
@@ -10,6 +10,6 @@ export * from './decorators/HttpMethods';
1010export * from './decorators/Inject' ;
1111export * from './di/Container' ;
1212
13- export function createServer ( app : any , options : ServerOptions ) : void {
14- Server . create ( app , options ) ;
13+ export function generateControllers ( app : any , options : ServerOptions ) : void {
14+ Application . initialize ( app , options ) ;
1515}
You can’t perform that action at this time.
0 commit comments