summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-08-14 20:36:47 +0200
committerJules Laplace <julescarbon@gmail.com>2017-08-14 20:36:47 +0200
commit12c1d5bd29fcc23b5c0ddb0bf2332d256abbf3a9 (patch)
tree32bed6c58ee53c98d5dd5e1260b44bf43b41b0ca
project init
-rw-r--r--.gitignore12
-rw-r--r--README.md7
-rw-r--r--index.js64
-rw-r--r--package.json11
4 files changed, 94 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4dd7bd9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+.env
+node_modules/
+!public/db.json
+.DS_Store
+*.swp
+app.css
+app.min.js
+.tmp
+bower_components/
+npm-debug.log
+*.zip
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7f71f8c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+folkestone
+==========
+
+```
+npm install
+node index
+```
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) + '...');
+
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..0145e8f
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "folkestone",
+ "version": "1.0.0",
+ "description": "the folkestone gossip",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC"
+}