{"id":13516586,"url":"https://github.com/pillarjs/node-frameworks","last_synced_at":"2025-04-09T20:16:52.977Z","repository":{"id":15122653,"uuid":"17849651","full_name":"pillarjs/node-frameworks","owner":"pillarjs","description":"A comparison of server-side node frameworks","archived":false,"fork":false,"pushed_at":"2017-12-07T13:01:49.000Z","size":248,"stargazers_count":313,"open_issues_count":2,"forks_count":16,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-09T20:16:47.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pillarjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-18T01:23:16.000Z","updated_at":"2025-02-14T06:37:15.000Z","dependencies_parsed_at":"2022-09-09T02:50:53.647Z","dependency_job_id":null,"html_url":"https://github.com/pillarjs/node-frameworks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pillarjs%2Fnode-frameworks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pillarjs%2Fnode-frameworks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pillarjs%2Fnode-frameworks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pillarjs%2Fnode-frameworks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pillarjs","download_url":"https://codeload.github.com/pillarjs/node-frameworks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103859,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:23.840Z","updated_at":"2025-04-09T20:16:52.952Z","avatar_url":"https://github.com/pillarjs.png","language":null,"readme":"A comparison of server-side node frameworks.\nThis may include frameworks with a browser-side component.\n\n### Frameworks\n\nOnly frameworks with over 1,000 stars are currently added.\nFeel free to add your own.\nThe frameworks are listed by number of watchers, descending, as of March 18, 2014.\n\n| Framework              | Sponsor(s) / Author(s)                                | Watchers | Stars  |\n------------------------:|-------------------------------------------------------|----------|--------|\n| [Meteor][meteor]       | [Meteor Development Group][meteorgroup]               | 973      | 11,687 |\n| [Express][express]     | [StrongLoop][strongloop] / [TJ Holowaychuk][tj]       | 828      | 12,824 |\n| [Sails][sails]         | [Mike McNeil][mikemcneil]                             | 485      | 5,582  |\n| [Koa][koa]             | [TJ Holowaychuk][tj]                                  | 232      | 3,160  |\n| [Derby][derby]         | [Nate Smith][natesmith] [Brian Noguchi][briannoguchi] | 213      | 3,079  |\n| [Kraken][kraken]       | [PayPal][paypal]                                      | 210      | 2,424  |\n| [Hapi][hapi]           | [Walmart Labs][walmart]                               | 204      | 1,981  |\n| [Connect][connect]     | [Sencha Labs][senchalabs]                             | 202      | 4,180  |\n| [LoopBack][loopback]   | [StrongLoop][strongloop]                              | 187      | 2,602  |\n| [Restify][restify]     | [Mark Cavage][markcavage]                             | 122      | 2,001  |\n| [Geddy][geddy]         | [Matthew Eernisse][mattheweernisse]                   | 101      | 1,703  |\n| [CompoundJS][compound] | [Anatoliy Chakkaev][1602]                             | 91       | 1,542  |\n| [Flatiron][flatiron]   | [Nodejitsu][nodejitsu]                                | 75       | 1,146  |\n\n### Stack Integration\n\nTraditionally, frameworks are explicitly server-side. However, there are now frameworks that are vertically integrated, i.e. integrate the client with the server.\n\n| Framework  | Server-side | Client-side |\n|-----------:|-------------|-------------|\n| Meteor     | ✓           | ✓           |\n| Express    | ✓           |             |\n| Sails      | ✓           |             |\n| Koa        | ✓           |             |\n| Derby      | ✓           | ✓           |\n| Kraken     | ✓           |             |\n| Hapi       | ✓           |             |\n| Connect    | ✓           |             |\n| LoopBack   | ✓           | ✓           |\n| Restify    | ✓           |             |\n| Geddy      | ✓           | ✓           |\n| CompoundJS | ✓           |             |\n| Flatiron   | ✓           |             |\n\n### Dependencies\n\nSome frameworks are built upon other frameworks.\n\n| Framework  | Dependencies                     |\n|-----------:|----------------------------------|\n| Meteor     |                                  |\n| Express    | [Connect][connect] for `\u003c 4.0.0` |\n| Sails      | [Express][express]               |\n| Koa        |                                  |\n| Derby      |                                  |\n| Kraken     | [Express][express]               |\n| Hapi       |                                  |\n| Connect    |                                  |\n| LoopBack   | [Express][express]               |\n| Restify    |                                  |\n| Geddy      |                                  |\n| CompoundJS |                                  |\n| Flatiron   |                                  |\n\n### Source Lines of Code\n\nThis is the lines of code a framework uses, not including comments.\nThis is used to gauge complexity and modularity of a framework.\n\n| Framework  | Source Lines of Code | Version      |\n|-----------:|----------------------|--------------|\n| Meteor     |                      |              |\n| Express    | 1,150                | 4.0.0-rc3    |\n| Sails      | 5,350                | 0.10.0-rc4   |\n| Koa        | 550                  | 0.5.1        |\n| Derby      | 1,450                | 0.6.0-alpha3 |\n| Kraken     | 680                  | 0.7.         |\n| Hapi       | 4,750                | 3.0.0        |\n| Connect    | 120                  | 3.0.0-rc1    |\n| LoopBack   | 10,472               | 2.8.0        |\n| Restify    | 3,970                | 2.6.3        |\n| Geddy      | 5,660                | 0.12.4       |\n| CompoundJS | 3,010                | 1.1.13-1     |\n| Flatiron   | 581                  | 0.3.11       |\n\nNote: [sloc](https://www.npmjs.org/package/sloc) is used to calculate the SLOC. Most are simply counted by running `sloc lib` and `lines of source code` is used.\n\n### Middleware/Plugin Signature\n\nDifferent frameworks use plugins and middleware differently.\nSome use objects, others use functions.\nSome work with node's `req` and `res` objects, whereas many others do not.\n\nA framework \"supports node\" if node's `req` and `res` objects are passed to plugins and middleware,\nand using node's `req` and `res` objects is supported.\n\n| Framework  | Signature                                          | Supports Node |\n|-----------:|----------------------------------------------------|---------------|\n| Meteor     |                                                    | ×             |\n| Express    | `app.use(function (req, res, next) {})`            | ✓             |\n| Sails      | `function(req, res, next)`                         | ✓             |\n| Koa        | `app.use(function* (next) {})`                     | ×             |\n| Derby      |                                                    |               |\n| Kraken     | `app.use(function (req, res, next) {})`            | ✓             |\n| Hapi       | `app.ext('onRequest', function (req, next) {})`    | ×             |\n| Connect    | `app.use(function (req, res, next) {})`            | ✓             |\n| LoopBack   | `app.use(function (req, res, next) {})`            | ✓             |\n| Restify    | `app.use(function (req, res, next) {})`            | ✓             |\n| Geddy      | `this.before(function (req, res) {})`              | ✓             |\n| CompoundJS |                                                    |               |\n| Flatiron   |                                                    |               |\n\n### Error Handling\n\nError handling in node.js is wonderful!\nThe current solution to catch uncaught exceptions (emitters and streams throwing errors everywhere) is to use [domains][domains] (unless you listen to every error).\nIf a framework does not handle uncaught exceptions, then domains should probably use [domains][domains].\n\n| Framework  | Middleware/Plugin                                                | Uncaught Exceptions Handling    |\n|-----------:|------------------------------------------------------------------|---------------------------------|\n| Meteor     |                                                                  |                                 |\n| Express    | `next(err)` / `app.use(function (err, req, res, next) {})`       | ×                               |\n| Sails      |                                                                  |                                 |\n| Koa        | try/catch                                                        | × - Unnecessary with generators |\n| Derby      |                                                                  |                                 |\n| Kraken     | `next(err)` / `app.use(function (err, req, res, next) {})`       |                                 |\n| Hapi       |                                                                  | [domains][domains]              |\n| Connect    | `next(err)` / `app.use(function (err, req, res, next) {})`       | ×                               |\n| LoopBack   | `next(err)` / `app.use(function (err, req, res, next) {})`       | x                               |\n| Restify    | `next(err)`                                                      |                                 |\n| Geddy      |                                                                  |                                 |\n| CompoundJS |                                                                  |                                 |\n| Flatiron   |                                                                  |                                 |\n\n### Control Flow\n\nMost frameworks use only node's traditional callbacks for control.\nAs we move towards ES6, we will see frameworks that use generators and promises to avoid callback hell.\nAny framework without a `control flow` is assumed to use callbacks unless otherwise specified.\n\n| Framework  | Control Flow          |\n|-----------:|-----------------------|\n| Meteor     | [fibers][fibers]      |\n| Express    |                       |\n| Sails      |                       |\n| Koa        | generators - [co][co] |\n| Derby      |                       |\n| Kraken     |                       |\n| Hapi       |                       |\n| Connect    |                       |\n| LoopBack   |                       |\n| Restify    |                       |\n| Geddy      |                       |\n| CompoundJS |                       |\n| Flatiron   |                       |\n\n### Included Features\n\nIf a feature is not included, there is a very good possibility that it can be used via middleware or plugin.\nWhich features a framework includes or does not include is unimportant - its philosophy is.\n\n| Framework  | Content Negotiation | Cookie Management | Routing | View System | Body Parsing | Multipart Parsing |\n|-----------:|---------------------|-------------------|---------|-------------|--------------|-------------------|\n| Meteor     |                     |                   |         |             |              |                   |\n| Express    | ✓                   | ✓                 | ✓       | ✓           |              |                   |\n| Sails      | ✓                   | ✓                 | ✓       | ✓           | ✓            | ✓                 |\n| Koa        | ✓                   | ✓                 |         |             |              |                   |\n| Derby      |                     |                   |         |             |              |                   |\n| Kraken     | ✓                   | ✓                 | ✓       | ✓           |              |                   |\n| Hapi       |                     |                   |         |             |              |                   |\n| Connect    |                     |                   |         |             |              |                   |\n| LoopBack   | ✓                   | ✓                 | ✓       | ✓           |              |                   |\n| Restify    | ✓                   |                   | ✓       |             | ✓            | ✓                 |\n| Geddy      | ✓                   | ✓                 | ✓       | ✓           | ✓            |                   |\n| CompoundJS |                     |                   |         |             |              |                   |\n| Flatiron   |                     |                   |         |             |              |                   |\n\n| Framework  | Session Management  | CSRF Protection | Compression | File Uploads | Basic Authentication |\n|-----------:|---------------------|-----------------|-------------|--------------|----------------------|\n| Meteor     |                     |                 | ✓           |              | ✓                    |\n| Express    |                     |                 |             | ✓            |                      |\n| Sails      | ✓                   | ✓               |             | ✓            |                      |\n| Koa        |                     |                 |             |              |                      |\n| Derby      |                     |                 |             |              |                      |\n| Kraken     |                     |                 |             |              |                      |\n| Hapi       |                     |                 |             |              |                      |\n| Connect    |                     |                 |             |              |                      |\n| LoopBack   |                     |                 |             | ✓            |                      |\n| Restify    |                     |                 | ✓           |              | ✓                    |\n| Geddy      | ✓                   | ✓               |             |              | ✓                    |\n| CompoundJS |                     |                 |             |              |                      |\n| Flatiron   |                     |                 |             |              |                      |\n\n- Content Negotiation - ability to negotiation server response types and the request's acceptable types.\n- Cookie Management - ability to parse cookies as well as set cookies\n- Routing -\n- View System - ability to choose a templating system and render templates by their name\n- Body Parsing - ability to parse urlencoded and json request bodies\n- Multipart Parsing - ability to part multipart request bodies\n- Session Management - ability to provide non-authenticated cookie-based sessions\n- CSRF Protection - built in CSRF protection\n- Compression - built-in gzip and deflate response compression\n- File Uploads - built-in ability to send local files to the client\n- Basic Authentication\n\n### Database\n\n| Framework  | Required Databases     | Recommended Databases | Compatible Databases                                   |\n|-----------:|------------------------|-----------------------|--------------------------------------------------------|\n| Meteor     | [MongoDB][mongodb]     |                       |                                                        |\n| Express    |                        |                       |                                                        |\n| Sails      |                        |                       | MongoDB, MySQL, Postgres                               |\n| Koa        |                        |                       |                                                        |\n| Derby      |                        |                       |                                                        |\n| Kraken     |                        |                       |                                                        |\n| Hapi       |                        |                       |                                                        |\n| Connect    |                        |                       |                                                        |\n| LoopBack   |                        |                       | Microsoft SQL Server, MongoDB, MySQL, Oracle, Postgres |\n| Restify    |                        |                       |                                                        |\n| Geddy      |                        |                       | LevelDB, MongoDB, MySQL, Postgres, Riak, SQLite        |\n| CompoundJS |                        |                       |                                                        |\n| Flatiron   |                        |                       |                                                        |\n\n### Templating\n\n| Framework  | Required Templating Systems | Recommended Templating Systems | Compatible Templating Systems         |\n|-----------:|-----------------------------|--------------------------------|---------------------------------------|\n| Meteor     | [handlebars][handlebars]    |                                |                                       |\n| Express    |                             |                                | [consolidate][consolidate]            |\n| Sails      |                             |                                | [consolidate][consolidate]            |\n| Koa        |                             |                                |                                       |\n| Derby      |                             | [handlebars][handlebars]-like  |                                       |\n| Kraken     |                             | [dustjs][dustjs]               | [consolidate][consolidate]            |\n| Hapi       |                             |                                |                                       |\n| Connect    |                             |                                |                                       |\n| LoopBack   |                             |                                | [consolidate][consolidate]            |\n| Restify    |                             |                                |                                       |\n| Geddy      |                             |                                | handlebars, EJS, Jade, Swig, mustache |\n| CompoundJS |                             |                                |                                       |\n| Flatiron   |                             |                                |                                       |\n\n[consolidate][consolidate] means that the framework supports any templating system supported by consolidate.js.\n\n## Contributing\n\nWhen adding a new framework, you __must__ add the simplest metadata such as links, SLOC, stack, and dependencies.\nFrameworks without a decent amount of stars are not welcomed.\nDo not spam your brand new framework.\n\nPerformance comparisons are __not__ welcomed.\n\nMetadata should be updated for the __latest stable versions__, including release candidates, but not including alpha or beta versions.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Jonathan Ong me@jongleberry.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n[strongloop]: http://strongloop.com/\n[loopback]: http://loopback.io/\n[express]: http://expressjs.com/\n[koa]: https://github.com/koajs/koa\n[connect]: https://github.com/senchalabs/connect\n[meteor]: https://github.com/meteor/meteor\n[tj]: http://github.com/tj\n[derby]: https://github.com/codeparty/derby\n[sails]: https://github.com/balderdashy/sails\n[compound]: https://github.com/1602/compound\n[geddy]: https://github.com/geddy/geddy\n[flatiron]: https://github.com/flatiron/flatiron\n[hapi]: https://github.com/spumko/hapi\n[walmart]: http://www.walmartlabs.com\n[meteorgroup]: https://www.meteor.com\n[mikemcneil]: https://github.com/balderdashy\n[natesmith]: https://github.com/nateps\n[briannoguchi]: https://github.com/bnoguchi\n[1602]: https://github.com/1602\n[nodejitsu]: http://nodejitsu.com\n[mattheweernisse]: https://github.com/mde\n[senchalabs]: http://senchalabs.org\n[co]: https://github.com/visionmedia/co\n[kraken]: http://krakenjs.com\n[paypal]: http://paypal.github.io\n[handlebars]: http://handlebarsjs.com\n[mongodb]: http://www.mongodb.org\n[dustjs]: https://github.com/akdubya/dustjs\n[restify]: https://github.com/mcavage/node-restify\n[markcavage]: https://github.com/mcavage\n[fibers]: https://github.com/laverdet/node-Fibers\n[consolidate]: https://github.com/visionmedia/consolidate.js/\n[domains]: http://nodejs.org/api/domain.html\n","funding_links":[],"categories":["Technical","Others","others"],"sub_categories":["ramanihiteshc@gmail.com"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpillarjs%2Fnode-frameworks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpillarjs%2Fnode-frameworks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpillarjs%2Fnode-frameworks/lists"}