File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Not required. Use only if you want to use the proxy for requests during local development to bypass rate limits
1+ # Not required. Use only if you want to use the proxy for local requests to bypass rate limits
22REPLAYS_RELAY_URL = https://relay.your-domain/relay
33REPLAYS_RELAY_TOKEN = replace-with-long-random-token
Original file line number Diff line number Diff line change 1414
1515This app contains several jobs, that parses replays data from < https://sg.zone/replays >
1616
17- ## Local development and Cloudflare rate limit
17+ ## Local runs and Cloudflare rate limit
1818
1919` sg.zone ` is protected by Cloudflare and has strict polling/rate limits for non-whitelisted IPs.
20- Without proxying, replays list parsing can fail during local development .
20+ Without proxying, replays list parsing can fail when running parser locally .
2121
2222Use external relay service (for example ` sg_stats_relay ` ) on a whitelisted server.
2323
@@ -33,7 +33,7 @@ REPLAYS_RELAY_TOKEN=<the-same-token-from-server>
3333Run parser
3434
3535``` bash
36- npm run generate-replays-list-dev
36+ npm run generate-replays-list
3737```
3838
3939## Contacts
Original file line number Diff line number Diff line change 1515 "test" : " jest --silent src/!tests" ,
1616 "test:watch" : " jest src/!tests --watch" ,
1717 "generate-replays-list" : " npm run build-dist && node dist/jobs/prepareReplaysList/start.js" ,
18- "generate-replays-list-dev" : " npm run build-dist && NODE_ENV=development node dist/jobs/prepareReplaysList/start.js" ,
1918 "parse" : " npm run build-dist && node ./dist/start.js" ,
20- "parse-dev" : " npm run build-dist && NODE_ENV=development node ./dist/start.js" ,
21- "parse-new-year" : " npm run build-dist && node ./dist/!yearStatistics/index.js" ,
22- "parse-new-year-dev" : " npm run build-dist && NODE_ENV=development node ./dist/!yearStatistics/index.js"
19+ "parse-new-year" : " npm run build-dist && node ./dist/!yearStatistics/index.js"
2320 },
2421 "author" : " Afgan0r" ,
2522 "devDependencies" : {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import os from 'os' ;
22import path from 'path' ;
33
4- import isDev from './isDev' ;
5-
6- const statsPath = path . join ( os . homedir ( ) , isDev ? 'dev_sg_stats' : 'sg_stats' ) ;
4+ const statsPath = path . join ( os . homedir ( ) , 'sg_stats' ) ;
75
86export const rawReplaysPath = path . join ( statsPath , 'raw_replays' ) ;
97
You can’t perform that action at this time.
0 commit comments