This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const bodyParser = require('body-parser') | |
module.exports = (Model) => { | |
let controller = express.Router() | |
controller.use(bodyParser.json()) | |
controller.get('/', (req, res) => { | |
Model.scan().exec( (err, elements) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Use $ like React.createElement | |
$ = React.createElement | |
#No jsx, just use coffee | |
$ MyComponent, { propName: 'value', secondPropName: 'value' }, | |
$ MySubComponent, {} | |
$ "div", { className: 'explain' }, "Text in div" |