Skip to content

Commit

Permalink
remove host:port prametrs
Browse files Browse the repository at this point in the history
  • Loading branch information
irustm committed Jun 18, 2019
1 parent 234d49e commit 7aca5b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,16 @@ export class App {
private metadata: MetadataArgsStorage;
private staticConfig: StaticFilesConfig;
private viewRenderConfig: ViewRenderConfig;

constructor(settings: AppSettings) {
this.metadata = getMetadataArgsStorage();
this.registerAreas(this.metadata);
this.registerControllers(this.metadata.controllers);
}

async listen(host: string = '0.0.0.0', port: number = 8000) {
const s = serve(`${host}:${port}`);
console.log(`Server start in ${host}:${port}`);
async listen(address: string = '0.0.0.0:8000') {
const s = serve(address);
console.log(`Server start in ${address}`);
for await (const req of s) {
try {
const res: Response = {};
Expand Down

0 comments on commit 7aca5b1

Please sign in to comment.