Ein Projekt das es ermöglicht Beerpong über das Internet von zwei unabhängigen positionen aus zu spielen. Entstehung im Rahmen einer Praktikumsaufgabe im Fach Interaktion.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

package.json 6.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "name": "morgan",
  3. "description": "http request logger middleware for node.js",
  4. "version": "1.3.2",
  5. "author": {
  6. "name": "Jonathan Ong",
  7. "email": "me@jongleberry.com",
  8. "url": "http://jongleberry.com"
  9. },
  10. "contributors": [
  11. {
  12. "name": "Douglas Christopher Wilson",
  13. "email": "doug@somethingdoug.com"
  14. }
  15. ],
  16. "license": "MIT",
  17. "repository": {
  18. "type": "git",
  19. "url": "git://github.com/expressjs/morgan"
  20. },
  21. "dependencies": {
  22. "basic-auth": "1.0.0",
  23. "depd": "0.4.5",
  24. "on-finished": "2.1.0"
  25. },
  26. "devDependencies": {
  27. "istanbul": "0.3.2",
  28. "mocha": "~1.21.0",
  29. "should": "~4.0.4",
  30. "supertest": "~0.13.0"
  31. },
  32. "files": [
  33. "LICENSE",
  34. "HISTORY.md",
  35. "index.js"
  36. ],
  37. "engines": {
  38. "node": ">= 0.8.0"
  39. },
  40. "scripts": {
  41. "test": "mocha --check-leaks --reporter spec --bail",
  42. "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot",
  43. "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec"
  44. },
  45. "readme": "# morgan\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n[![Gratipay][gratipay-image]][gratipay-url]\n\nHTTP request logger middleware for node.js\n\n> Named after [Dexter](http://en.wikipedia.org/wiki/Dexter_Morgan), a show you should not watch until completion.\n\n## API\n\n```js\nvar morgan = require('morgan')\n```\n\n### morgan(format, options)\n\nCreate a new morgan logger middleware function using the given `format` and `options`.\nThe `format` argument may be a string of a predefined name (see below for the names),\na string of a format string, or a function that will produce a log entry.\n\n#### Options\n\nMorgan accepts these properties in the options object.\n\n#### buffer\n\nBuffer duration before writing logs to the `stream`, defaults to `false`. When\nset to `true`, defaults to `1000 ms`.\n\n#### immediate\n\nWrite log line on request instead of response. This means that a requests will\nbe logged even if the server crashes, _but data from the response (like the\nresponse code, content length, etc.) cannot be logged_.\n\n##### skip\n\nFunction to determine if logging is skipped, defaults to `false`. This function\nwill be called as `skip(req, res)`.\n\n```js\n// EXAMPLE: only log error responses\nmorgan('combined', {\n skip: function (req, res) { return res.statusCode < 400 }\n})\n```\n\n##### stream\n\nOutput stream for writing log lines, defaults to `process.stdout`.\n\n#### Predefined Formats\n\nThere are various pre-defined formats provided:\n\n##### combined\n\nStandard Apache combined log output.\n\n```\n:remote-addr - :remote-user [:date] \":method :url HTTP/:http-version\" :status :res[content-length] \":referrer\" \":user-agent\"\n```\n\n##### common\n\nStandard Apache common log output.\n\n```\n:remote-addr - :remote-user [:date] \":method :url HTTP/:http-version\" :status :res[content-length]\n```\n\n##### dev\n\nConcise output colored by response status for development use. The `:status`\ntoken will be colored red for server error codes, yellow for client error\ncodes, cyan for redirection codes, and uncolored for all other codes.\n\n```\n:method :url :status :response-time ms - :res[content-length]\n```\n\n##### short\n\nShorter than default, also including response time.\n\n```\n:remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms\n```\n\n##### tiny\n\nThe minimal output.\n\n```\n:method :url :status :res[content-length] - :response-time ms\n```\n\n#### Tokens\n\n- `:req[header]` ex: `:req[Accept]`\n- `:res[header]` ex: `:res[Content-Length]`\n- `:http-version`\n- `:response-time`\n- `:remote-addr`\n- `:remote-user`\n- `:date`\n- `:method`\n- `:url`\n- `:referrer`\n- `:user-agent`\n- `:status`\n\nTo define a token, simply invoke `morgan.token()` with the name and a callback function. The value returned is then available as \":type\" in this case:\n```js\nmorgan.token('type', function(req, res){ return req.headers['content-type']; })\n```\n\n## Examples\n\n### express/connect\n\nSimple app that will log all request in the Apache combined format to STDOUT\n\n```js\nvar express = require('express')\nvar morgan = require('morgan')\n\nvar app = express()\n\napp.use(morgan('combined'))\n\napp.get('/', function (req, res) {\n res.send('hello, world!')\n})\n```\n\n### vanilla http server\n\nSimple app that will log all request in the Apache combined format to STDOUT\n\n```js\nvar finalhandler = require('finalhandler')\nvar http = require('http')\nvar morgan = require('morgan')\n\n// create \"middleware\"\nvar logger = morgan('combined')\n\nhttp.createServer(function (req, res) {\n var done = finalhandler(req, res)\n logger(req, res, function (err) {\n if (err) return done(err)\n\n // respond to request\n res.setHeader('content-type', 'text/plain')\n res.end('hello, world!')\n })\n})\n```\n\n### write logs to a file\n\nSimple app that will log all request in the Apache combined format to the file \"access.log\"\n\n```js\nvar express = require('express')\nvar fs = require('fs')\nvar morgan = require('morgan')\n\nvar app = express()\n\n// create a write stream (in append mode)\nvar accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a'})\n\n// setup the logger\napp.use(morgan('combined', {stream: accessLogStream}))\n\napp.get('/', function (req, res) {\n res.send('hello, world!')\n})\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/morgan.svg?style=flat\n[npm-url]: https://npmjs.org/package/morgan\n[travis-image]: https://img.shields.io/travis/expressjs/morgan.svg?style=flat\n[travis-url]: https://travis-ci.org/expressjs/morgan\n[coveralls-image]: https://img.shields.io/coveralls/expressjs/morgan.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/expressjs/morgan?branch=master\n[downloads-image]: http://img.shields.io/npm/dm/morgan.svg?style=flat\n[downloads-url]: https://npmjs.org/package/morgan\n[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat\n[gratipay-url]: https://www.gratipay.com/dougwilson/\n",
  46. "readmeFilename": "README.md",
  47. "bugs": {
  48. "url": "https://github.com/expressjs/morgan/issues"
  49. },
  50. "_id": "morgan@1.3.2",
  51. "_from": "morgan@~1.3.0"
  52. }