Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sample/sample11-complete-sample-express/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { createExpressServer } from '../../src/index';
// base directory. we use it because file in "required" in another module
const baseDir = __dirname;

// koa is used just as an example here. you can also use express
// to do it simply use createExpressServer instead of createKoaServer
// express is used just as an example here. you can also use koa
// to do it simply use createKoaServer instead of createExpressServer
const app = createExpressServer({
controllers: [baseDir + '/modules/**/controllers/*{.js,.ts}'],
middlewares: [baseDir + '/modules/**/middlewares/*{.js,.ts}'],
});
app.listen(3001);

console.log('Koa server is running on port 3001. Open http://localhost:3001/blogs/');
console.log('Express server is running on port 3001. Open http://localhost:3001/blogs/');