var okcms = require('..'); var projectSchema = { id: {type: 'string', id: true, hidden: true}, title: {type: 'string'}, menu: {type: 'string'}, description: {type: 'text'}, media: {type: 'media-list'}, thumbnail: {type: 'image'}, } var app = okcms.createApp({ meta: { project: 'TwoHustlers' }, root: 'public', debug: false, production: true, schemas: { page: { id: {type: 'string', hidden: true}, title: {type: 'string'}, body: {type: 'text'}, contact: {type: 'text'}, image: {type: 'string'} }, advertising: projectSchema, content: projectSchema, experiential: projectSchema, shape: { id: {type: 'string', id: true, hidden: true}, title: {type: 'string'}, images: {type: 'double-captioned-image-list'}, } }, resources: [ { type: 'page', static: {id: 'about'}}, { type: 'page', static: {id: 'contact'}}, { type: 'shape', static: {id: 'shape-images'}}, { type: 'shape', static: {id: 'about-images'}}, { type: 'advertising' }, { type: 'content' }, { type: 'experiential' }, ], services: { s3: { key: process.env.S3_KEY, secret: process.env.S3_SECRET, bucket: process.env.S3_BUCKET, dirname: "twohustlers", maxbytes: 1024*1024*2, } }, views: { '/': { data: [ {type: 'page', query: 'contact'}, // {type: 'shape', query: 'about-images'}, {type: 'shape', query: 'shape-images'}, // {type: 'retail', query: '*'}, {type: 'advertising', query: '*'}, {type: 'experiential', query: '*'}, {type: 'content', query: '*'}, ] }, '/about': { data: [ {type: 'page', query: 'about'}, {type: 'shape', query: 'about-images'}, ], template: 'about' }, '/contact': { data: {type: 'page', query: 'contact'} }, '/all': { data: [ // {type: 'retail', query: '*'}, {type: 'advertising', query: '*'}, {type: 'experiential', query: '*'}, {type: 'content', query: '*'}, ], template: 'all' }, // '/retail/:id': { // data: { // type: 'retail', // as: 'project', // query: { // id: ':id' // } // }, // template: 'project' // }, '/advertising/:id': { data: { type: 'advertising', as: 'project', query: { id: ':id' } }, template: 'project' }, '/experiential/:id': { data: { type: 'experiential', as: 'project', query: { id: ':id' } }, template: 'project' }, '/content/:id': { data: { type: 'content', as: 'project', query: { id: ':id' } }, template: 'project' } } }).listen(1337); console.log('Server listening at port 1337...');