To run,
$ npm install -g motley
$ motley| node_modules | |
| npm-debug.log | |
| db |
| module.exports = function (app) { | |
| return app.controller() | |
| .get('/', function (req, res, next) { | |
| res.render('index'); | |
| }) | |
| }; |
| module.exports = function (app) { | |
| return app.collection({ | |
| name: 'items' | |
| }); | |
| }; |
| afterware: "*_afterware.js" | |
| collections: "*_collection.js" | |
| controllers: "*_controller.js" | |
| middleware: "*_middleware.js" | |
| plugins: "*_plugin.js" | |
| public: "*.css" | |
| views: "*.hbs" | |
| port: 3000 | |
| title: new motley gist |
| body { | |
| font-family: Helvetica, sans-serif; | |
| padding: 50px; | |
| font-size: 1.1em; | |
| } | |
| input, textarea { | |
| font-family: Helvetica, sans-serif; | |
| padding: 10px; | |
| font-size: 1em; | |
| } | |
| a { | |
| color: #e00; | |
| text-decoration: none; | |
| } | |
| .success { | |
| color: green; | |
| } | |
| .error { | |
| color: red; | |
| } | |
| code { | |
| background-color: #eee; | |
| color: #555; | |
| padding: 0 5px 0 5px; | |
| border-radius: 5px; | |
| } |
| module.exports = function (app) { | |
| return function (req, res, next) { | |
| res.vars.title = app.conf.title; | |
| res.vars.dir = app.dir; | |
| next(); | |
| }; | |
| }; |