node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

express-cjsx

express-cjsx

Dependency Status Gratipay

CoffeeScript React component view engine for Express to create isomorphic applications.

Requirements

Install

npm install express-cjsx

Usage

{createEngine} = require 'express-cjsx'
app = do express
app.set 'view engine''cjsx'
app.engine 'cjsx'do createEngine

Optional: Passing options

{createEngine} = require 'express-cjsx'
app = do express
app.set 'view engine''cjsx'
app.engine 'cjsx'createEngine extension: '.react.coffee'

Options

Option Values Default
extension Any file name extension with leading dot (i.e .cjsx) ".cjsx"
beautify Beautify HTML markup, may affect performance false|off|no
doctype Any valid doctype, defaults to HTML5. "<!DOCTYPE html>"