Migration to 0.2.x: TL;DR guide
Commands
-
Change
zappa app.coffeetocoffee app.coffee. -
Change
zappa -w app.coffeetonpm install run -gandrunjs app.coffee. -
Change
zappa -c app.coffeetocoffee -c app.coffee.
Root Scope
-
Add
require('zappa') ->to apps. -
Add
@include = ->to includes. -
Add
enable 'default template'to use it. -
Add
use 'static'to serve static files from/public. -
Add
use 'bodyParser', 'cookieParser', session: {secret: 'foo'}to use them. -
Change
usingtorequiring. -
Change
app().http_servertoapp. -
Change
app().ws_servertoio. -
Change
view ->andrender 'default'toview index: ->andrender 'index'. -
Change
layout ->toview layout: ->. -
Change
msg foo: ->toat foo: ->. -
Change
at disconnection: ->toat disconnect: ->. -
Change
client 'path/to/foo': ->tocoffee '/path/to/foo.js': ->. -
Change
style 'path/to/foo': ->tocss '/path/to/foo.css': ->. -
Instead of
app 'chat'etc, use:zappa 8001, -> get '/': 'chat' zappa 8002, -> get '/': 'wiki'
Request Scope
- Change
render 'foo', apply: 'bar'torender 'foo', postrender: 'bar'.
Event (WebSockets) Scope
-
Change
app.footodef data: {foo: 'bar'}anddata.foo. -
Change
sendtoemit.
Template Scope
- Change
@contentto@body.
Not implemented yet
-
route. -
renderin socket events.