1.0.3 • Published 9 years ago

express-composer v1.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

express-composer

A composition library built by extending express

Build Status Coverage Status Dependency Status devDependency Status

Modules

<a name="module_express-composer"></a>

express-composer

method for creating an express application with express-compose mixin

Example

var expressComposer = require('express-composer');

expressComposer() ⇒ app

Creates an extended express app

Kind: Exported function
Example

var express = require('expressComposer'),
    app = express();

expressComposer.extend(app) ⇒ app

Extends an express app if it was not created with express-compose

Kind: static method of expressComposer

ParamTypeDescription
appfunctionexpress app

Example

var express = require('express'),
    expressComposer = require('express-composer'),
    app = express();
expressComposer.extend(app);

expressComposer.handle(handlers, scopeProvider) ⇒ function

Creates an express middle ware handler that will iterate through composers handlers

Kind: static method of expressComposer

ParamTypeDescription
handlersArray.<function()> | function
scopeProviderScopeProviderthe scope of these handlers

expressComposer.error(handlers, scopeProvider) ⇒ function

Creates an express middle ware error handler that will iterate through composers error handlers

Kind: static method of expressComposer

ParamTypeDescription
handlersArray.<function()> | function
scopeProviderScopeProviderthe scope for these handlers

expressComposer.validate(validate, scopeProvider) ⇒ function

Create an express middle ware that validates an incoming request

Kind: static method of expressComposer

ParamTypeDescription
validatefunctionvalidation function
scopeProviderScopeProviderscope variable

expressComposer~scopeArg : Object | function | Promise.<Object>

Kind: inner typedef of expressComposer

expressComposer~requestHandlers : function | Array.<function()>

Kind: inner typedef of expressComposer

expressComposer~pathArg : String

Kind: inner typedef of expressComposer

expressComposer~appOptions : Object

Express application options passed into express

Kind: inner typedef of expressComposer
Properties

NameTypeDescription
dotFilesStringOption for serving dotfiles. Possible values are �allow�, �deny�, and �ignore�
etagBooleanEnable or disable etag generation
extentionsBooleanSets file extension fallbacks.
indexObject | StringSends directory index file. Set false to disable directory indexing.
lastModifiedBooleanSet the Last-Modified header to the last modified date of the file on the OS. Possible values are true or false.
maxAgeBooleanSet the max-age property of the Cache-Control header in milliseconds or a string in ms format
redirectNumberRedirect to trailing �/� when the pathname is a directory.
setHeadersfunctionFunction for setting HTTP headers to serve with the file.

expressComposer~routerOptions : Object

Options passed into express Router{http://expressjs.com/api.html#router}

Kind: inner typedef of expressComposer
Properties

NameTypeDescription
caseSensitiveBooleanEnable case sensitivity.
mergeParamsBooleanPreserve the req.params values from the parent router. If the parent and the child have conflicting param names, the child�s value take precedence.
strictBooleanEnable strict routing.

expressComposer~requestMethod : object

Kind: inner typedef of expressComposer
Properties

NameTypeDescription
validatorfunctionfunction used to validate the request
preHandlersrequestHandlershandlers that will be called during execution of the route
scopescopeArgscope values to inject into the context of the handlers
errorHandlersrequestHandlershandlers called if there is an error during the request
nameStringname of the method
descriptionStringdescription about what this method does

expressComposer~requestMethods : object

Kind: inner typedef of expressComposer
Properties

NameTypeDescription
checkoutrequestMethod | requestHandlershandles checkout requests
connectrequestMethod | requestHandlershandles connect requests
copyrequestMethod | requestHandlershandles copy requests
deleterequestMethod | requestHandlershandles delete requests
getrequestMethod | requestHandlershandles get requests
headrequestMethod | requestHandlershandles head requests
lockrequestMethod | requestHandlershandles lock requests
m-searchrequestMethod | requestHandlershandles m-search requests
mergerequestMethod | requestHandlershandles merge requests
mkactivityrequestMethod | requestHandlershandles mkactivity requests
mkcolrequestMethod | requestHandlershandles mkcol requests
moverequestMethod | requestHandlershandles move requests
notifyrequestMethod | requestHandlershandles notify requests
optionsrequestMethod | requestHandlershandles options requests
patchrequestMethod | requestHandlershandles patch requests
postrequestMethod | requestHandlershandles post requests
propfindrequestMethod | requestHandlershandles propfind requests
proppatchrequestMethod | requestHandlershandles proppatch requests
purgerequestMethod | requestHandlershandles purge requests
putrequestMethod | requestHandlershandles put requests
reportrequestMethod | requestHandlershandles report requests
searchrequestMethod | requestHandlershandles search requests
subscriberequestMethod | requestHandlershandles subscribe requests
tracerequestMethod | requestHandlershandles trace requests
unlockrequestMethod | requestHandlershandles unlock requests
unsubscriberequestMethod | requestHandlershandles unsubscribe requests

expressComposer~routeScore : Object

Kind: inner typedef of expressComposer
Properties

NameTypeDescription
methodsrequestMethodsmethods for this route
preHandlersrequestHandlershandlers that are executed before a route method
errorHandlersrequestHandlershandlers for errors within this route
scopescopeArgscope argument for this route
nameStringthe name of the route
descriptionStringa description of the route
pathpathArgthe path for the route

expressComposer~routerScore : Object

Kind: inner typedef of expressComposer
Properties

NameTypeDescription
preHandlersrequestHandlershandlers that are executed during this route
routesrouteScore | Array.<routeScore>routes for this router
errorHandlersrequestHandlershandles errors tha occurred in this route
scopescopeArgscope options to include in this scope
routersrouterScorenested routers
nameStringname of this route
descriptionStringa description of this route
pathpathArgthe path to this route
routerOptionsoptions for the router

expressComposer~appScore : Object

Kind: inner typedef of expressComposer
Properties

NameTypeDescription
preHandlersrequestHandlershandlers that are executed for this app
errorHandlersrequestHandlershandles errors tha occurred in this route
scopescopeArgscope options to include in this scope
routersrouterScore | Array.<routerScore>nested routers
nameStringname of this route
descriptionStringa description of this route
appOptionsoptions for the router
appScore | Array.<appScore>apps for this app
pathpathArgthe path for the app
vhostStringa vhost routing string
propertiesObjectan object used to set express options
1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.3.0

9 years ago

0.2.8

9 years ago

0.2.7

9 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago