npm.io
1.0.0 • Published 9 years ago

vulcain-ext-express

Licence
Apache-2.0
Version
1.0.0
Deps
3
Vulns
0
Weekly
0

Vulcain extension to use express as server adapter

How to use it

Install package with

npm install vulcain-ext-express --save

Create a new adapter extending ExpressAdapter which will replace the default adapter

import { ExpressAdapter } from 'vulcain-ext-express';

// Declare your new adapter before running application
@Injectable(LifeTime.Singleton, DefaultServiceNames.ServerAdapter )
class MyAdapter extends ExpressAdapter {
    initializeRoutes(express) {
        // Add express initialization here
    }
}

// MyAdapter will be use automatically
let app = new ApplicationBuilder('Domain')
    .runAsync();