Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Dev server issues #92

Closed
unlight opened this issue Jan 21, 2017 · 2 comments
Closed

Dev server issues #92

unlight opened this issue Jan 21, 2017 · 2 comments
Labels

Comments

@unlight
Copy link

unlight commented Jan 21, 2017

1. Expose server instance

This need need graceful shutdown and to subscribe on events like close, etc.

gulp.task('server:dev', (done) => {
    const server = fuseBox.devServer('>main.ts');
    server.on('close', () => done);
});

2. Allow to add middlewares

The most used middlewares for dev server are:

  1. Proxy
  2. connect-history-api-fallback (Angular2)
@unlight
Copy link
Author

unlight commented Jan 21, 2017

  1. Provide Api (server) for explicitly call client's refresh (hot and full)

@nchanged
Copy link
Contributor

In 1.3.72

const devServer = fuseBox.devServer(">index.ts", {
    port: 8083,
    root : false // if you want to serve "/" by yourself
});
devServer.httpServer.app.use(/* your middleware */)

API thingy has been moved to a different issue

@devmondo devmondo added the bug label Mar 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants