Package Exports
- shallot
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shallot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Shallot
Shallot is a HTTP DSL based on coffeescript. It is very similar to zappa but tries to be more lightweight.
Installation
npm install shallot
Usage
Probably the shortest example possible
require('shallot') -> @get -> 'Hello World!'
No seriously
Shallot does not depend on express. It rather is up to you which kind of middlewares you want to use and what kind of rendering engine you require. It uses copperhead as router.
connect = require 'connect'
require('shallot') ->
@use connect.static 'public'
@get ->
'Hello World!'
@get '/:name', ->
"Hello #{@name}!"
More
More features may be added in the future. The main goal is to achieve the most powerful HTTP server functionality with minimal lines of code.