File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,9 @@ will automatically reload with the newest version.
8282You 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+
8588const httpServer = new ExpressHTTPServer (/* {options} */ );
8689const app = httpServer .app ;
8790app .use (' /api' , apiRoutes);
@@ -94,7 +97,9 @@ server.start();
9497or 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' );
97101const ExpressHTTPServer = require (' fastboot-app-server/lib/express-http-server' );
102+
98103class MyCustomExpressServer extends ExpressHTTPServer {
99104 serve (middleware ) {
100105 // put your custom code here, don't forget to add fastboot etc.
@@ -224,6 +229,8 @@ reload.
224229You can enable Basic Authentication by providing ` username ` and ` password ` options:
225230
226231``` js
232+ const FastBootAppServer = require (' fastboot-app-server' );
233+
227234let server = new FastBootAppServer ({
228235 username: ' tomster' ,
229236 password: ' zoey'
You can’t perform that action at this time.
0 commit comments