File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ will automatically reload with the newest version.
7979You 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+
8285const httpServer = new ExpressHTTPServer (/* {options} */ );
8386const app = httpServer .app ;
8487app .use (' /api' , apiRoutes);
@@ -91,7 +94,9 @@ server.start();
9194or 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' );
9498const ExpressHTTPServer = require (' fastboot-app-server/lib/express-http-server' );
99+
95100class MyCustomExpressServer extends ExpressHTTPServer {
96101 serve (middleware ) {
97102 // put your custom code here, don't forget to add fastboot etc.
@@ -221,6 +226,8 @@ reload.
221226You can enable Basic Authentication by providing ` username ` and ` password ` options:
222227
223228``` js
229+ const FastBootAppServer = require (' fastboot-app-server' );
230+
224231let server = new FastBootAppServer ({
225232 username: ' tomster' ,
226233 password: ' zoey'
You can’t perform that action at this time.
0 commit comments