Created
September 25, 2015 17:21
-
-
Save sghiassy/c2d11f6ef1e52a431abf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function runServer(options, readyCallback) { | |
| var app = connect() | |
| .use(loadRawBody) | |
| .use(openStackFrameInEditor) | |
| .use(getDevToolsLauncher(options)) | |
| .use(statusPageMiddleware) | |
| // Temporarily disable flow check until it's more stable | |
| //.use(getFlowTypeCheckMiddleware(options)) | |
| .use(getAppMiddleware(options)); | |
| options.projectRoots.forEach(function(root) { | |
| app.use(connect.static(root)); | |
| }); | |
| app.use(connect.logger()) | |
| .use(connect.compress()) | |
| .use(connect.errorHandler()); | |
| return http.createServer(app).listen(options.port, '::', readyCallback); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment