Sha256: 6e7d38fc78bf15aac05281a268fd97838f7c51a134eb615be645575fda774865

Contents?: true

Size: 432 Bytes

Versions: 17

Compression:

Stored size: 432 Bytes

Contents

var connect = require('../')
  , http = require('http');

// try:
//   - viewing in a browser
//   - curl http://localhost:3000
//   - curl -H "Accept: application/json" http://localhost:3000

var app = connect()
  .use(function(req, res, next){
    var err = new Error('oh noes!');
    err.number = 7;
    throw err;
  })
  .use(connect.errorHandler());

http.Server(app).listen(3000);
console.log('Server started on port 3000');

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/connect/examples/error.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/connect/examples/error.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/connect/examples/error.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/connect/examples/error.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/connect/examples/error.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/connect/examples/error.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/connect/examples/error.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/connect/examples/error.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/connect/examples/error.js