Derbyjs: access session in app routes or x-bind function

  1. derby new TestDerby
  2. Uncomment server/index.js
  3. add console.log(model.get(),model.session) to app/index.js - this.start
  4. model.session is undefined

    (had a quick look at racer/lib/session/session.Store.js)

or derby recommend to use model.set('_session-item-key',value) instead of session?

You have access to session via model.session. Write a custom middleware to hook into the creation of your expressApp: model = req.getModel(); model.set('_whatever', model.session.whatever); Example custom middleware, example model.session