dox-foundation-demo node_modules/express/lib/express.js

connect

declaration
connect

    Description

    Module dependencies.

    Source

    var connect = require('connect')
      , proto = require('./application')
      , Route = require('./router/route')
      , Router = require('./router')
      , req = require('./request')
      , res = require('./response')
      , utils = connect.utils;

      Description

      Expose createApplication().

      Source

      exports = module.exports = createApplication;

      createApplication

      function
      createApplication()
      • @return: {Function}

      Description

      Create an express application.

      Source

      function createApplication() {
        var app = connect();
        utils.merge(app, proto);
        app.request = { __proto__: req, app: app };
        app.response = { __proto__: res, app: app };
        app.init();
        return app;
      }

        Description

        Expose connect.middleware as express.*
        for example express.logger etc.

        Source

        for (var key in connect.middleware) {
          Object.defineProperty(
              exports
            , key
            , Object.getOwnPropertyDescriptor(connect.middleware, key));
        }

        createServer

        method
        exports.createServer()

          Description

          Error on createServer().

          Source

          exports.createServer = function(){
            console.warn('Warning: express.createServer() is deprecated, express');
            console.warn('applications no longer inherit from http.Server,');
            console.warn('please use:');
            console.warn('');
            console.warn('  var express = require("express");');
            console.warn('  var app = express();');
            console.warn('');
            return createApplication();
          };

          application

          property
          exports.application

            Description

            Expose the prototypes.

            Source

            exports.application = proto;
            exports.request = req;
            exports.response = res;

            Route

            property
            exports.Route

              Description

              Expose constructors.

              Source

              exports.Route = Route;
              exports.Router = Router;
              
              // Error handler title
              
              exports.errorHandler.title = 'Express';