diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2018-05-07 09:27:51 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2018-05-07 09:27:51 +0200 |
| commit | 1b980682ec71e9c1997747c440a6ad14e31beaf9 (patch) | |
| tree | 5d2a3a3b0d4b0db1d3b8798f96d880f6677fd219 | |
| parent | 5da95f1afc4471af6f8636148dca41c11e0b9d1f (diff) | |
| download | brokentalents-1b980682ec71e9c1997747c440a6ad14e31beaf9.tar.gz brokentalents-1b980682ec71e9c1997747c440a6ad14e31beaf9.zip | |
add npm data update script and brief readme
| -rw-r--r-- | README | 10 | ||||
| -rw-r--r-- | backend/config.js | 4 | ||||
| -rw-r--r-- | package.json | 3 |
3 files changed, 14 insertions, 3 deletions
@@ -0,0 +1,10 @@ +# brokentalents.fun + +## Setup + + * `npm install` + * create backend/secret.js as `module.exports.apikey = 'yourapikey';` or export the env var `API_KEY=""` + +## Updating the data + +`npm run backend` diff --git a/backend/config.js b/backend/config.js index cecbe05..dc13956 100644 --- a/backend/config.js +++ b/backend/config.js @@ -54,7 +54,7 @@ module.exports = { sum: ['Level', 'Winner'], }, file: { - pattern: (moment) => `../data/${hashSettings(module.exports)}/${moment.toISOString()}.json`, - reportPattern: () => `../data/${hashSettings(module.exports)}/report.json`, + pattern: (moment) => `./data/${hashSettings(module.exports)}/${moment.toISOString()}.json`, + reportPattern: () => `./data/${hashSettings(module.exports)}/report.json`, }, }; diff --git a/package.json b/package.json index 49ff23a..1f5f5fb 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ }, "devDependencies": {}, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "backend": "node backend/index.js" }, "repository": { "type": "git", |
