How to use the @vertx/web.StaticHandler.create function in @vertx/web

To help you get started, we’ve selected a few @vertx/web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pmlopes / presentations / demo-2 / server.js View on Github external
<title>Universal Blog</title>
              
              
                <div id="app">${appHtml}</div>
                
              
              `);
    } else {
      ctx.next();
    }
  });
});

app.get().handler(StaticHandler.create());


vertx
  // create a HTTP server
  .createHttpServer()
  // on each request pass it to our APP
  .requestHandler(function (req) {
    app.accept(req);
  })
  // listen on port 8080
  .listen(8080);

@vertx/web

Generated Eclipse Vert.x bindings for 'vertx-web'

Apache-2.0
Latest version published 7 months ago

Package Health Score

64 / 100
Full package analysis

Similar packages