change args
This commit is contained in:
parent
e2aa17980b
commit
9a8111224b
1 changed files with 6 additions and 5 deletions
5
site.js
5
site.js
|
@ -4,6 +4,7 @@ import { rankCalc } from "./rank.js";
|
||||||
|
|
||||||
let cache = {};
|
let cache = {};
|
||||||
let site = process.env.site || 'darflen';
|
let site = process.env.site || 'darflen';
|
||||||
|
let route = process.env.route || './test.txt';
|
||||||
let hh;
|
let hh;
|
||||||
|
|
||||||
async function textCollector(word, path, file) {
|
async function textCollector(word, path, file) {
|
||||||
|
@ -22,8 +23,8 @@ async function siteCollector(user, path, site) {
|
||||||
let i = 1;
|
let i = 1;
|
||||||
let out = [];
|
let out = [];
|
||||||
|
|
||||||
if (site.startsWith('text_')) {
|
if (site == 'file') {
|
||||||
return await textCollector(user, path, site.split('text_')[1]);
|
return await textCollector(user, path, route);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Loading…
Reference in a new issue