Skip to content

Commit f84e75e

Browse files
authored
Merge pull request #50 from locks/patch-1
Add requires to code samples
2 parents f52b360 + 27ae009 commit f84e75e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ will automatically reload with the newest version.
8282
You can customize HTTP server (add middlewares, subdomains, etc.), either directly:
8383
```js
8484
// start.js
85+
const FastBootAppServer = require('fastboot-app-server');
86+
const ExpressHTTPServer = require('fastboot-app-server/lib/express-http-server');
87+
8588
const httpServer = new ExpressHTTPServer(/* {options} */);
8689
const app = httpServer.app;
8790
app.use('/api', apiRoutes);
@@ -94,7 +97,9 @@ server.start();
9497
or extend the provided HTTP server and override any methods you need:
9598
```js
9699
// my-custom-express-server.js
100+
const FastBootAppServer = require('fastboot-app-server');
97101
const ExpressHTTPServer = require('fastboot-app-server/lib/express-http-server');
102+
98103
class MyCustomExpressServer extends ExpressHTTPServer {
99104
serve(middleware) {
100105
// put your custom code here, don't forget to add fastboot etc.
@@ -224,6 +229,8 @@ reload.
224229
You can enable Basic Authentication by providing `username` and `password` options:
225230

226231
```js
232+
const FastBootAppServer = require('fastboot-app-server');
233+
227234
let server = new FastBootAppServer({
228235
username: 'tomster',
229236
password: 'zoey'

0 commit comments

Comments
 (0)