the coffee creamer!
)(C[_] coffeemate, the coffee creamer!
coffeemate is a web framework built on top of connect and specialized for writing web apps comfortably in coffeescript. It uses eco template engine by default for fullfill coffeescript experience. But also using coffeekup or any other template engine is only a matter of few seconds.
coffeemate's magic is hidden inside that, it is perfectly a singleton instance of connect framework's
HTTPServer implementation. So hacking coffeemate is pretty easy and funny :)
# app.coffee# Require itmate = require 'coffeemate'# Connect itmateloggermatestatic"/public"# Extend it="<span style=\"background-color:\"></span>"# Route itmateget '/greet/:name'-># this is context variable@greet_msg = "Hello, "@render 'main'# Remote it= ->consolelog 'Hello, World!'# Listen itmatelisten 3000
<!-- layout.eco --><%- @include @body %>
<!-- main.eco -->Welcome to Coffeemate<%- @highlight '#f00', @greet_msg %><%- @include 'nested' %>
<!-- nested.eco -->I'm a partial template<%- @highlight '#ff0', @greet_msg %>
Hmmm, What to expect more?
$ npm install coffeemate
Annotated source documentation generated by docco can be found here http://kadirpekel.github.com/coffeemate
See plenty of examples
Copyright (c) 2011 Kadir Pekel.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.