{"id":13513748,"url":"https://github.com/mauricemach/zappa","last_synced_at":"2025-05-16T05:06:29.224Z","repository":{"id":57405228,"uuid":"1013319","full_name":"mauricemach/zappa","owner":"mauricemach","description":"Node development for the lazy.","archived":false,"fork":false,"pushed_at":"2020-04-16T03:21:01.000Z","size":621,"stargazers_count":944,"open_issues_count":33,"forks_count":79,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-11T21:44:04.265Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"zappajs.org","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauricemach.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-10-21T20:29:02.000Z","updated_at":"2025-04-08T17:13:57.000Z","dependencies_parsed_at":"2022-09-16T18:41:31.444Z","dependency_job_id":null,"html_url":"https://github.com/mauricemach/zappa","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricemach%2Fzappa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricemach%2Fzappa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricemach%2Fzappa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricemach%2Fzappa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauricemach","download_url":"https://codeload.github.com/mauricemach/zappa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"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:00:37.008Z","updated_at":"2025-05-16T05:06:29.200Z","avatar_url":"https://github.com/mauricemach.png","language":"CoffeeScript","funding_links":[],"categories":["CoffeeScript","Micro Frameworks inspired by Sinatra (Other Languages)"],"sub_categories":[],"readme":"    8888888888P        d8888 8888888b.  8888888b.     d8888          @@@    @@@ \n          d88P        d88888 888   Y88b 888   Y88b   d88888        @@@@@@@@@@@@@@\n         d88P        d88P888 888    888 888    888  d88P888       @@@@@@@@@@@@@@@@\n        d88P        d88P 888 888   d88P 888   d88P d88P 888      @@@@@@@@  @@@@@@@@\n       d88P        d88P  888 8888888P\"  8888888P\" d88P  888      @@@            @@@\n      d88P        d88P   888 888        888      d88P   888      @@   @@@@@@@@   @@\n     d88P        d8888888888 888        888     d8888888888           @@@@@@@@    \n    d8888888888 d88P     888 888        888    d88P     888            @@@@@@     \n\n# Node development for the lazy\n\nIf you can describe it in 495 characters, why on earth should it take 879?\n\nZappa is a [CoffeeScript](http://coffeescript.org)-optimized interface to [Express](http://expressjs.com) and [Socket.IO](http://socket.io) that makes this:\n\n```coffee\nrequire('zappa') -\u003e\n  Gizmo = require './model/gizmo'\n  \n  @use 'bodyParser', 'methodOverride', @app.router, 'static'\n\n  @configure\n    development: =\u003e @use errorHandler: {dumpExceptions: on}\n    production: =\u003e @use 'errorHandler'\n\n  @get '/': -\u003e @render 'index'\n  \n  @get '/gizmos/:id': -\u003e\n    Gizmo.findById @params.id, (err, gizmo) =\u003e\n      @render index: {err, gizmo}\n\n  @on connection: -\u003e\n    @emit welcome: {time: new Date()}\n\n  @on shout: -\u003e\n    @broadcast shout: {@id, text: @data.text}\n```\n\nEquivalent to this:\n\n```coffee\nexpress = require 'express'\napp = express.createServer()\nio = require('socket.io').listen(app)\n\nGizmo = require './model/gizmo'\n\napp.use express.bodyParser()\napp.use express.methodOverride()\napp.use app.router\napp.use express.static __dirname + '/public'\n\napp.configure 'development', -\u003e\n  app.use express.errorHandler dumpExceptions: on\n\napp.configure 'production', -\u003e\n  app.use express.errorHandler()\n\napp.get '/', (req, res) -\u003e res.render 'index'\n\napp.get '/gizmos/:id', (req, res) -\u003e\n  Gizmo.findById req.params.id, (err, gizmo) -\u003e\n    res.render 'index', {err, gizmo}\n\nio.sockets.on 'connection', (socket) -\u003e\n  socket.emit 'welcome', time: new Date()\n\n  socket.on 'shout', (data) -\u003e\n    socket.broadcast.emit 'shout',\n      id: socket.id, text: data.text\n\napp.listen 3000\n\nconsole.log \"Express server listening on port %d in %s mode\",\n  app.address().port, app.settings.env\n```\n\nAnd throws in some additional features while at it:\n\n```coffee\nrequire('zappa') -\u003e\n  @enable 'default layout', 'serve jquery',\n    'serve sammy', 'minify'\n\n  @get '/': -\u003e\n    @render 'index'\n\n  @on connection: -\u003e\n    @emit welcome: {result: sum 1, 2}\n  \n  @shared '/shared.js': -\u003e\n    root = window ? global\n    root.sum = (x, y) -\u003e x + y\n  \n  @client '/index.js': -\u003e\n    @connect()\n\n    @get '#/route': -\u003e\n      $('body').append 'client routes!'\n\n    @on welcome: -\u003e\n      $('body').append \"welcomed: #{sum @data.result, 2}\"\n  \n  @view index: -\u003e\n    @title = 'PicoChat!'\n    @scripts = ['/socket.io/socket.io', '/zappa/jquery',\n      '/zappa/sammy', '/zappa/zappa', '/shared', '/index']\n  \n    h1 @title\n```\n\n## Learn More\n\n- Get the gist with the [crash course](http://zappajs.org/docs/crashcourse)\n\n- Check the [API reference](http://zappajs.org/docs/0.3-gumbo/reference)\n\n- See the [examples](https://github.com/mauricemach/zappa/tree/master/examples) included with the source\n\n- Read the [annotated source](http://zappajs.org/docs/zappa.html) generated by [docco](http://jashkenas.github.com/docco/)\n\n## Other resources\n\n- The source code [repository](http://github.com/mauricemach/zappa) at github\n\n- Questions, suggestions? Drop us a line on the [mailing list](http://groups.google.com/group/zappajs)\n\n- Rather do it realtime? Join the IRC channel on freenode: [#zappajs]((irc://irc.freenode.net/zappajs)\n\n- Found a bug? Open an [issue](http://github.com/mauricemach/zappa/issues) at github\n\n- Check the project's history at the [change log](https://github.com/mauricemach/zappa/blob/master/CHANGELOG.md)\n\n- Migrating from an earlier version? Read the announcements ([0.2.x](http://zappajs.org/docs/0.2-peaches/announcement)/[0.3.x](http://zappajs.org/docs/0.3-gumbo/announcement)) for an overview on changes, and follow the TL;DR migration guides ([0.2.x](http://zappajs.org/docs/0.2-peaches/migration)/[0.3.x](http://zappajs.org/docs/0.3-gumbo/migration))\n\n- Deploying to heroku? Check [this blog post](http://blog.superbigtree.com/blog/2011/08/19/hosting-zappa-0-2-x-on-heroku/)\n\n## Thanks loads\n\nTo all people behind the excellent libs that made this little project possible, more specifically: \n\n- Jeremy Ashkenas for CoffeeScript, the \"little\" language is nothing short of revolutionary to me.\n\n- TJ Holowaychuk for the robust and flexible cornerstone that's Express.\n\n- Guillermo Rauch for solving (as far as I'm concerned) the comet problem once and for all.\n\n- Ryan Dahl for Node.js, without which nothing of this would be possible.\n\nAlso:\n\n- Blake Mizerany for Sinatra, the framework that made me redefine simple.\n\n- why the lucky stiff, for making me redefine hacking.\n\n- And last but not least Frank Zappa, for the spirit of nonconformity and experimentation that inspires me to push forward. Not to mention providing the soundtrack.\n\n\"Why do you necessarily have to be wrong just because a few million people think you are?\" - FZ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricemach%2Fzappa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauricemach%2Fzappa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricemach%2Fzappa/lists"}