:recycle: [Refactor] Prettify endpoint console logs, and install nodemon
Browse files- README.md +0 -2
- package.json +2 -1
- storages/endpoint_storage.js +2 -2
README.md
CHANGED
@@ -9,8 +9,6 @@ app_port: 23456
|
|
9 |
|
10 |
Mirrors:
|
11 |
* https://hansimov-llm-mixer.hf.space
|
12 |
-
* https://hf-llm-api.vercel.app
|
13 |
-
|
14 |
|
15 |
## Run
|
16 |
### Command Line
|
|
|
9 |
|
10 |
Mirrors:
|
11 |
* https://hansimov-llm-mixer.hf.space
|
|
|
|
|
12 |
|
13 |
## Run
|
14 |
### Command Line
|
package.json
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
"dependencies": {
|
3 |
"axios": "^1.6.2",
|
4 |
"body-parser": "^1.20.2",
|
5 |
-
"express": "^4.18.2"
|
|
|
6 |
}
|
7 |
}
|
|
|
2 |
"dependencies": {
|
3 |
"axios": "^1.6.2",
|
4 |
"body-parser": "^1.20.2",
|
5 |
+
"express": "^4.18.2",
|
6 |
+
"nodemon": "^3.0.3"
|
7 |
}
|
8 |
}
|
storages/endpoint_storage.js
CHANGED
@@ -14,7 +14,7 @@ class EndpointStorage {
|
|
14 |
"index, endpoint, api_key, need_protect, available_models",
|
15 |
});
|
16 |
this.db.endpoints.count((count) => {
|
17 |
-
console.log(`${count} endpoints loaded.`);
|
18 |
});
|
19 |
}
|
20 |
clear_database() {
|
@@ -32,7 +32,7 @@ class EndpointStorage {
|
|
32 |
return;
|
33 |
}
|
34 |
let count = Object.keys(data).length;
|
35 |
-
console.log(`${count}
|
36 |
// data is array of endpoint items, each item has 4 keys:
|
37 |
// - `endpoint`, `api_key`, `api_type`, `need_protect`
|
38 |
// add these to db.endpoints
|
|
|
14 |
"index, endpoint, api_key, need_protect, available_models",
|
15 |
});
|
16 |
this.db.endpoints.count((count) => {
|
17 |
+
console.log(`${count} endpoints loaded from cookies.`);
|
18 |
});
|
19 |
}
|
20 |
clear_database() {
|
|
|
32 |
return;
|
33 |
}
|
34 |
let count = Object.keys(data).length;
|
35 |
+
console.log(`${count} endpoints loaded from local file.`);
|
36 |
// data is array of endpoint items, each item has 4 keys:
|
37 |
// - `endpoint`, `api_key`, `api_type`, `need_protect`
|
38 |
// add these to db.endpoints
|