Giter VIP home page Giter VIP logo

connect's Introduction

Connect

Connect is an extensible HTTP server framework for node, providing high performance "plugins" known as middleware.

Connect is bundled with over 14 commonly used middleware, including a logger, session support, cookie parser, and more. Be sure to view the 1.0 documentation.

1.0 Migration Guide

Connect 1.0 is a near-complete rewrite of Connect, with this comes some changes, including some (minor) API changes, and removal of a few middleware, which you are welcome to rip out of previous versions as third-party middleware.

Middleware Removed

  • cache cached everything. This is less than ideal for dynamic apps, rendering this middleware relatively useless.
  • conditionalGet blanketed all requests, requiring the entire response to be computed before a response could be concluded. This is extremely wasteful.
  • staticGzip useless. gzip / ship assets to a CDN
  • gzip buggy
  • lint lame

Middleware Renamed

  • staticProvider is now static
  • bodyDecoder is now bodyParser
  • cookieDecoder is now cookieParser

Middleware Added

connect.createServer()

The connect.createServer() method is now optional, and equivalent to connect(). For example:

  connect.createServer(
      connect.logger()
    , connect.static(__dirname)
  ).listen(3000); 

is the same as:

  connect(
      connect.logger()
    , connect.static(__dirname)
  ).listen(3000);

When an options object is passed as the first argument it is assumed to be an https server:

  connect({ options here }
      connect.logger()
    , connect.static(__dirname)
  ).listen(443);

Charset

The charset is not longer forced via mime.type() resolution, now you must explicitly assign this via res.charset = 'utf8' etc.

Running Tests

first:

$ git submodule update --init

then:

$ make test

Authors

Below is the output from git-summary.

  project: connect
  commits: 1408
  files  : 100
  authors: 
    1184	Tj Holowaychuk
    191	Tim Caswell
      8	Astro
      5	Nathan Rajlich
      4	Jakub Nešetřil
      2	Aaron Heckmann
      2	Fabian Jakobs
      2	Jacques Crocker
      2	James Campos
      1	Jakub Nesetril
      1	Andreas Lind Petersen
      1	Joshua Peek
      1	Jxck
      1	Gregory McWhirter
      1	Eran Hammer-Lahav
      1	Bart Teeuwisse
      1	Guillermo Rauch

Node Compatibility

Connect < 1.0.0 is compatible with node 0.2.x

Connect >= 1.0.0 is compatible with node 0.4.x

License

View the LICENSE file.

connect's People

Contributors

tj avatar creationix avatar astro avatar tootallnate avatar zzen avatar xla avatar fjakobs avatar aeosynth avatar aheckmann avatar papandreou avatar gsmcwhirter avatar rauchg avatar josh avatar jxck avatar

Stargazers

Daza Grohovaz avatar

Watchers

Daza Grohovaz avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.