deployd/deployd — pull request #184 by guanbo (2013-05-08 06:49:03+00:00)
Title: improve session

1. Save body info when login
===
````
POST /users/login
{
"username": "johnsmith",
"password": "password",
"role": "owner"
}
```
`role` will be save into `ctx.session`

2. Access from On Event Script
===
add session variable on scriptContent

```
OnGet /users
session.count = session.count || 0;
session.count++;
```

Then we can
```
OnPost /todos
console.log(session.count)
```