Package com.vtence.molecule.middlewares

Examples of com.vtence.molecule.middlewares.StaticAssets.index()


        // Serve static assets (e.g. js files, images, css files, etc) for any request whose path starts
        // with one of the url prefixes specified (in this example, we're serving all requests).
        StaticAssets assets = new StaticAssets(files).serve("/");
        // If request targets a directory (i.e. request path ends with "/"),
        // serve the index.html file located in that directory (the default behavior).
        assets.index("index.html");

        // Log all accesses to the server in apache common log format
        server.add(new ApacheCommonLogger(logger))
              .start(assets);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.