diff options
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/index.js b/index.js new file mode 100644 index 0000000..d6928e9 --- /dev/null +++ b/index.js @@ -0,0 +1,64 @@ +var okcms = require('okcms') +var path = require('path') + +var isProduction = process.env.OK_PRODUCTION === 'true' + +var app = okcms.createApp({ + + project: 'Folkestone Gossip', + + debug: !isProduction, + production: isProduction, + +// admin: { +// dashboard: { +// resources: { +// painting: { +// display: 'image', +// } +// } +// } +// }, + + schemas: { + entry: { + id: {type: 'string', hidden: true}, + title: {type: 'string'}, + date: {type: 'string'}, + tags: {type: 'text'}, + body: {type: 'text'}, + media: {type: 'media'}, + disabled: {type: 'flag'}, + }, + page: { + id: {type: 'string', hidden: true}, + title: {type: 'string'}, + body: {type: 'text'}, + disabled: {type: 'flag'}, + }, + }, + + resources: [ + { type: 'entry' }, + { type: 'page' }, + ], + + views: { + '/': { template: 'index' }, + '/entry/:id': { template: 'index' }, + }, + + services: { + s3: { + key: process.env.S3_KEY, + secret: process.env.S3_SECRET, + bucket: process.env.S3_BUCKET, + dirname: process.env.S3_DIRNAME, + maxbytes: 1024*1024*2, + }, + }, + +}).listen(process.env.PORT || 1337) + +console.log('Server listening at port ' + (process.env.PORT || 1337) + '...'); + |
