feat: 初始化proxy代理请求

This commit is contained in:
2024-10-06 03:23:49 +08:00
parent 9725145a43
commit 12e5184126
13 changed files with 1603 additions and 1 deletions

41
src/scripts/copy.ts Normal file
View File

@@ -0,0 +1,41 @@
import { UserApp, clearAllUserApp } from '../module/get-user-app.ts';
import { redis } from '../module/redis/redis.ts';
import path from 'path';
import { useFileStore } from '@abearxiong/use-file-store';
const filePath = useFileStore('upload');
const main = async () => {
const userApp = new UserApp({ user: 'root', app: 'codeflow' });
const res = await userApp.setCacheData();
console.log(res);
// userApp.close();
process.exit(0);
};
// main();
const getAll = async () => {
const userApp = new UserApp({ user: 'root', app: 'codeflow' });
const res = await userApp.getAllCacheData();
userApp.close();
};
// getAll();
// console.log('path', path.join(filePath, '/module/get-user-app.ts'));
const clearData = async () => {
const userApp = new UserApp({ user: 'root', app: 'codeflow' });
const res = await userApp.clearCacheData();
process.exit(0);
};
// clearData();
clearAllUserApp();
const expireData = async () => {
await redis.set('user:app:exist:' + 'codeflow:root', 'value', 'EX', 2);
process.exit(0);
};
// expireData();