mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
allow custom config
This commit is contained in:
parent
bac6a0dadd
commit
796f410248
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ node_modules/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
*.rdb
|
*.rdb
|
||||||
coverage/
|
coverage/
|
||||||
|
modules/config.js
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "0.10"
|
- "0.10"
|
||||||
|
before_script:
|
||||||
|
- cp "modules/config.example.js" "modules/config.js"
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
channels:
|
channels:
|
||||||
- "irc.esper.net#spongy"
|
- "irc.esper.net#spongy"
|
||||||
skip_join: true
|
skip_join: true
|
||||||
services:
|
services:
|
||||||
- redis-server
|
- redis-server
|
||||||
skip_join: true
|
|
||||||
2
Procfile
2
Procfile
@ -1 +1 @@
|
|||||||
web: npm start
|
web: cp "modules/config.example.js" "modules/config.js" && npm start
|
||||||
@ -20,5 +20,6 @@ You can [join us](https://webchat.esper.net/?channels=spongy) in #spongy on irc.
|
|||||||
* Clone the repository
|
* Clone the repository
|
||||||
* `npm install`
|
* `npm install`
|
||||||
* `redis-server`
|
* `redis-server`
|
||||||
|
* `cp "modules/config.example.js" "modules/config.js"`
|
||||||
* `npm start`
|
* `npm start`
|
||||||
* Access [http://localhost:3000](http://localhost:3000)
|
* Access [http://localhost:3000](http://localhost:3000)
|
||||||
13
modules/config.example.js
Normal file
13
modules/config.example.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
var config = {
|
||||||
|
min_size: 1, // < 1 will (obviously) cause crash
|
||||||
|
max_size: 512, // too big values might lead to slow response time or DoS
|
||||||
|
default_size: 160, // size to be used when no size given
|
||||||
|
local_cache_time: 3600, // seconds until we will check if the image changed. should be > 60 to prevent mojang 429 response
|
||||||
|
browser_cache_time: 3600, // seconds until browser will request image again
|
||||||
|
http_timeout: 1000, // ms until connection to mojang is dropped
|
||||||
|
faces_dir: 'skins/faces/', // directory where faces are kept. should have trailing '/'
|
||||||
|
helms_dir: 'skins/helms/', // directory where helms are kept. should have trailing '/'
|
||||||
|
debug_enabled: false // enables logging.debug
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -7,7 +7,7 @@ var config = {
|
|||||||
http_timeout: 3000, // ms until connection to mojang is dropped
|
http_timeout: 3000, // ms until connection to mojang is dropped
|
||||||
faces_dir: 'skins/faces/', // directory where faces are kept. should have trailing '/'
|
faces_dir: 'skins/faces/', // directory where faces are kept. should have trailing '/'
|
||||||
helms_dir: 'skins/helms/', // directory where helms are kept. should have trailing '/'
|
helms_dir: 'skins/helms/', // directory where helms are kept. should have trailing '/'
|
||||||
debug_enabled: true // enables logging.debug
|
debug_enabled: true // enables logging.debug
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
Loading…
x
Reference in New Issue
Block a user