Skip to content

Commit 342cb08

Browse files
committed
Removed dev mode
1 parent 068f8ab commit 342cb08

5 files changed

Lines changed: 6 additions & 14 deletions

File tree

.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
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
22
REPLAYS_RELAY_URL=https://relay.your-domain/relay
33
REPLAYS_RELAY_TOKEN=replace-with-long-random-token

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
This 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

2222
Use 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>
3333
Run parser
3434

3535
```bash
36-
npm run generate-replays-list-dev
36+
npm run generate-replays-list
3737
```
3838

3939
## Contacts

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@
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": {

src/0 - utils/isDev.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/0 - utils/paths.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import os from 'os';
22
import 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

86
export const rawReplaysPath = path.join(statsPath, 'raw_replays');
97

0 commit comments

Comments
 (0)