Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
render = (pageName, action, args, tokens) ->
_render = require './render'
req = require './pages/' + pageName + '.cjsx'
if not isServer
req (page) -> _render page, action, args, tokens
else
page = req
_render page, action, args, tokens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment