Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nickdima
Created January 11, 2015 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickdima/6b809342d69c3a250d9a to your computer and use it in GitHub Desktop.
Save nickdima/6b809342d69c3a250d9a to your computer and use it in GitHub Desktop.
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