fastboot-app-server icon indicating copy to clipboard operation
fastboot-app-server copied to clipboard

Post FastBoot middleware hook (afterMiddleware) not working

Open pohodnya opened this issue 8 years ago • 0 comments

let server = new FastBootAppServer({
    distPath: process.env.DIST_PATH,
    gzip: true,
    beforeMiddleware(app) {
      app.use((req, res, next) => {
          console.log('beforeMiddleware');
          next();
      });
    },
    afterMiddleware(app) {
        app.use((err, req, res, next) => {
            console.log('afterMiddleware');
            next();
        });
    }
});

beforeMiddleware - work!
afterMiddleware - not work!

I want to change response body after Fastboot render. How can i do it?

pohodnya avatar Jan 12 '17 08:01 pohodnya