var okcms = require('..'); var app = okcms.createApp({ root: 'www', schemas: { page: { title: {type: 'string'}, body: {type: 'string'} }, project: { title: {type: 'string'}, index: {type: 'integer'}, category: {type: 'enum'}, body: {type: 'string'}, videos: [{type: 'uri'}], images: [{index: {type: 'string'}, uri: {type: 'uri'}}] } }, resources: [ { type: 'page', id: 'about' }, { type: 'page', id: 'contact' }, { type: 'project' }, ], views: { '/': { data: [ {type: 'project', id: '*'}, {type: 'page', id: '*'} ] }, '/about': { data: {type: 'page', id: 'about'} }, '/contact': { data: {type: 'page', id: 'contact'} }, '/:id': { data: {type: 'project', id: ':id'} } } }).listen(1337); console.log('Server listening at port 1337...');