-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.coffee
51 lines (49 loc) · 1.66 KB
/
config.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
fs = require 'fs'
pkg = require './package.json'
module.exports = {
# backend-only vars
pkg
listenOn: [
protocol: 'http'
module: 'http'
hostname: '0.0.0.0'
port: 3000
options: undefined # options for module.createServer
headers: # extra headers
'Cache-Control': 'no-cache, no-store, must-revalidate'
'Pragma': 'no-cache'
'Expires': '0'
'Server': "#{pkg.name}/#{pkg.version}"
],
subpath: '/' # host tastebin under a subpath
tastesDir: 'tastes' # where are tastes stored
git: {
enable: true # enable git versioning for tastes
remoteUrl: do () -> # enable pushing automatically to a remote
if fs.existsSync '.git'
"#{__dirname}/.git"
else
undefined
upstream: 'tastes' # which upstream branch to push to?
}
maxSize: '128kb' # allow only tastes smaller than 128 kilobytes
maxFilenameLength: 256 # allow tastes to have maximum 256 characters
morgan: # logging https://github.com/expressjs/morgan
format: 'common'
# backend & frontend vars
title: "#{pkg.name}/#{pkg.version}"
newTaste: [ # content for the "new taste" page
'A. \#{metaKeyName}+E to Edit'
'B. \#{metaKeyName}+S to Save'
' \#{metaKeyName}+Shift+S to Save As'
'C. Esc to cancel editing'
].join '\n'
stylesheets: '' # extra stylesheets
scripts: '' # extra scripts
theme: 'index' # default theme
themes: [ # available themes
'index'
]
hljsStyle: 'solarized_dark' # default style
hljsStyles: undefined # restrict available styles
}