Sha256: 7788d5be9fee2892c3895bb6042fda1a63c02d167fc1f7ebbbbfb102593bf951

Contents?: true

Size: 951 Bytes

Versions: 26

Compression:

Stored size: 951 Bytes

Contents

/**
 * Module dependencies.
 */

var Connect = require('./../../lib/connect');

var Server = module.exports = Connect.createServer(
    // No named params
    function params(){
        arguments[2]();
    },
    // Does not call next AND does not respond
    function hang(req, res, next){
        // Call foo() instead so
        // that our demo can still function.
        var foo = next;
        foo();

        // All good
        var ct = req.headers['content-type'];
    },
    function allGood(req, res, next){
        // All good
        next();
    },
    function reqHeaders(req, res, next){
        // Request headers are always normalized as
        // lowercased by ryan's http parser.
        var ct = req.headers['Content-Type'];
        next();
    },
    function methodUppercase(req, res, next){
        // req.method should be uppercase
        req.method = 'get';
        next();
    }
);

Server.use('/', Connect.lint(Server));

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
vulcan-0.8.2 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.8.1 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.8.0 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.7.2 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.7.1 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.7.0 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.6.1 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.6.0 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.5.0 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.4.0 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.3.0 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.2.5 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.2.4 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.2.3 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.2.2 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.2.1 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.2.0 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.1.6 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.1.5 server/node_modules/connect-form/support/connect/examples/lint/app.js
vulcan-0.1.4 server/node_modules/connect-form/support/connect/examples/lint/app.js