UNPKG

coffeerest-api-frontend-ng-admin

Version:
121 lines (119 loc) 3.52 kB
// Generated by CoffeeScript 1.9.3 (function() { module.exports = { output: { directory: "." }, app: { title: "foo", shortname: "bar", version: 1, server: { port: 80, proxy_url: "http://localhost/proxy", modules: [ { module: "proxy-express", template: "app.use proxy('api.bar.com'), '/bar'" }, { module: "express-api-user-management-signup", config: { webhook: { url: 'http://localhost/account', requestdata: { headers: { 'x-some-token': 'l1kj2k323' } } }, mongo: { host: 'localhost', port: 27017, name: 'foo' }, layout: { theme: 'jade', title: { brand: 'Projectname', welcome: 'Please login to your account' }, menu: { 'Apidoc': { target: '_blank', url: '/api/v1/doc' }, '---': '---', 'Contact': { target: '_blank', url: 'mailto:support@foo.com' } }, formurl: '/js/form.json' } }, template: "usermanagement = require 'express-api-user-management-signup' webhookport = process.env.WEBHOOK_HOST || port; webhookhost = process.env.WEBHOOK_HOST || 'http://'+ip cfg={{{config}}} app.set('port', {{usermanagement.port}}; app.use(usermanagement(app, express, cfg));" } ] }, frontend: { cards: { home: { topbar: { title: "Home", buttons: { back: false, forward: false } }, sections: [ { type: 'mustache', data: "<h2>welcome {{name}}</h2><hr>foo bar" }, { type: "data", data: { mustache: '<ul>{{data}}</ul>', type: "url", url: "http://foo.com/flop", "static": [ { name: "Foo", sex: "male" }, { name: "Foo", sex: "male" } ], transform: function(data, html) { var i, j, len, results; results = []; for (j = 0, len = data.length; j < len; j++) { i = data[j]; results.push(html += mustache.render("{{name}} - {{flop}}", data[i])); } return results; } } } ] } }, custom: { javascript: { getFoo: { frontend: function(foo, bar) { return console.log("hello world!"); }, backend: function() { return ["one", "two"]; } } }, css: { stylus: ".foo { display:none } b { border:1px solid red; }" } } } } }; }).call(this);