summaryrefslogtreecommitdiff
path: root/examples/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-08-17 02:18:49 -0400
committerJules Laplace <jules@okfoc.us>2016-08-17 02:18:49 -0400
commit7bb493d94240513635fca668d169256aa502d009 (patch)
tree1ac9c5fa78041c8f05f2092127b4d2d529d251f8 /examples/index.js
parent071fdf9d53becb08b6a54c8c49effcb6c1a23e98 (diff)
parent6ca70643c18df738fbad5a4e13b1c48fab9ea430 (diff)
Merge branch 'twohustlers' of github.com:okfocus/okcms into twohustlers
Diffstat (limited to 'examples/index.js')
-rw-r--r--examples/index.js33
1 files changed, 28 insertions, 5 deletions
diff --git a/examples/index.js b/examples/index.js
index fe37954..341a50b 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -1,10 +1,13 @@
var okcms = require('..');
+var isProduction = process.env.OK_PRODUCTION === 'true'
+
var app = okcms.createApp({
root: 'public',
- debug: true,
+ debug: !isProduction,
+ production: isProduction,
schemas: {
page: {
@@ -26,6 +29,11 @@ var app = okcms.createApp({
title: {type: 'string'},
flagged: {type: 'flag'},
media: {type: 'media-list'},
+ },
+ flour: {
+ id: {type: 'string', hidden: true},
+ title: {type: 'string'},
+ image: {type: 'image'},
}
},
@@ -34,6 +42,7 @@ var app = okcms.createApp({
{ type: 'page', static: {id: 'contact'}},
{ type: 'bread' },
{ type: 'test' },
+ { type: 'flour' },
],
services: {
@@ -42,10 +51,24 @@ var app = okcms.createApp({
secret: process.env.S3_SECRET,
bucket: process.env.S3_BUCKET,
dirname: "okcms-example",
- // TODO: maxbytes stuff isn't working, need to change underlying module
- image: { preserveFilename: false, maxbytes: 20000 },
- video: { preserveFilename: true, maxbytes: 0 },
- audio: { preserveFilename: true, maxbytes: 150000000 },
+ image: { allowed: true, preserveFilename: false, maxbytes: 2*1024*1024 },
+ video: { allowed: true, preserveFilename: true, maxbytes: 200*1024*1024 },
+ audio: { allowed: true, preserveFilename: true, maxbytes: 100*1024*1024 },
+ },
+
+ webhook: {
+ active: false,
+ secret: 'test',
+ command: '/path/to/build.sh',
+ },
+
+ example: {
+ lib: require("./lib/okexample"),
+ stuff: "things",
+ },
+
+ dumpfm: {
+ lib: require("./lib/okdumpfm"),
}
},