Skip to content

Commit 27ae009

Browse files
committed
Add requires to code samples
1 parent c6152ad commit 27ae009

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
@@ -79,6 +79,9 @@ will automatically reload with the newest version.
7979
You can customize HTTP server (add middlewares, subdomains, etc.), either directly:
8080
```js
8181
// start.js
82+
const FastBootAppServer = require('fastboot-app-server');
83+
const ExpressHTTPServer = require('fastboot-app-server/lib/express-http-server');
84+
8285
const httpServer = new ExpressHTTPServer(/* {options} */);
8386
const app = httpServer.app;
8487
app.use('/api', apiRoutes);
@@ -91,7 +94,9 @@ server.start();
9194
or extend the provided HTTP server and override any methods you need:
9295
```js
9396
// my-custom-express-server.js
97+
const FastBootAppServer = require('fastboot-app-server');
9498
const ExpressHTTPServer = require('fastboot-app-server/lib/express-http-server');
99+
95100
class MyCustomExpressServer extends ExpressHTTPServer {
96101
serve(middleware) {
97102
// put your custom code here, don't forget to add fastboot etc.
@@ -221,6 +226,8 @@ reload.
221226
You can enable Basic Authentication by providing `username` and `password` options:
222227

223228
```js
229+
const FastBootAppServer = require('fastboot-app-server');
230+
224231
let server = new FastBootAppServer({
225232
username: 'tomster',
226233
password: 'zoey'

0 commit comments

Comments
 (0)