Last active
December 22, 2015 16:39
-
-
Save carlos8f/6500937 to your computer and use it in GitHub Desktop.
motley gist template
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
| node_modules | |
| npm-debug.log |
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
| port: 3000 |
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
| var app = require('motley'); | |
| module.exports = app.controller() | |
| .get('/', function (req, res, next) { | |
| res.vars.title = 'Gist'; | |
| res.render('index'); | |
| }) |
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
| { | |
| "name": "motley-gist", | |
| "version": "0.0.0", | |
| "description": "ERROR: No README data found!", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "dependencies": { | |
| "motley": "~0.5.7" | |
| } | |
| } |
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
| var app = require('motley'); | |
| app.boot(function (err) { | |
| if (err) throw err; | |
| app.motley(); | |
| app.router.add(require('./controller').handler); | |
| app.server.listen(app.conf.port, function () { | |
| console.log('server listening on port', app.server.address().port); | |
| }); | |
| }); |
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
| body { | |
| padding: 3em; | |
| font-size: 120%; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment