Repository navigation
API Applet
An applet class extends the coffeecat-applet class. The coffeecat-applet class modifies the request object.
Type: Express.Application
Returns the express application for the container. This is used by the server to associate the application with the path.
Type: applet_configuration
Returns the configuration for this applet.
engine: The module name for the template engine to use.
Equivalent to this.app.set('view engine', engine); from Express
path: The path to search for templates.
Equivalent to this.app.set('views', root); from Express
root: The path to search for static content config: express.static-options
Equivalent to this.app.use(express.static(root, config)); from Express
engine: The module name for the session engine to use. args: Additional arguments to pass to the session engine.
Equivalent to this.app.use(_engine_(_args_));.
Example
this.setSession('express-session', {
secret: '95f0d5bd-b3aa-482d-8469-b6ee04776d8a',
resave: false,
saveUninitialized: true,
cookie: {
secure: true,
path: this.configuration.applet.container
}
});
Copyright (c) 2017 Michael Anderson