"feat: 新增远程应用测试脚本,升级 pm2 依赖"
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user