"feat: 新增远程应用测试脚本,升级 pm2 依赖"

This commit is contained in:
2025-05-22 13:19:57 +08:00
parent 1c2aa26dd0
commit 1e340ec2b3
8 changed files with 415 additions and 259 deletions

View File

@@ -2,6 +2,7 @@ import { Query } from '@kevisual/query';
import { app, assistantConfig } from '../app.ts';
import './config/index.ts';
import './shop-install/index.ts';
import os from 'node:os';
app
.route({
@@ -49,3 +50,31 @@ app
ctx.body = 'v1.0.0';
})
.addTo(app);
app
.route({
path: 'client',
key: 'time',
})
.define(async (ctx) => {
ctx.body = {
time: new Date().getTime(),
date: new Date().toLocaleDateString(),
};
})
.addTo(app);
app
.route({
path: 'client',
key: 'system',
})
.define(async (ctx) => {
const { platform, arch, release } = os;
ctx.body = {
platform: platform(),
arch: arch(),
release: release(),
};
})
.addTo(app);