diff --git a/packages/iceworks-server/src/app/middleware/client.ts b/packages/iceworks-server/src/app/middleware/client.ts index 72c8313d62..27b8df78db 100644 --- a/packages/iceworks-server/src/app/middleware/client.ts +++ b/packages/iceworks-server/src/app/middleware/client.ts @@ -1,5 +1,7 @@ import { checkAliInternal } from 'ice-npm-utils'; +const packageJSON = require('../../../package.json'); + export default function() { return async function client(ctx, next) { if (String(ctx.path).indexOf('/api') === 0) { @@ -15,6 +17,7 @@ export default function() { socketUrl: `//127.0.0.1:${process.env.PORT}/`, apiUrl: `//127.0.0.1:${process.env.PORT}/api/`, isAliInternal: await checkAliInternal(), + clientVersion: packageJSON.version.split('.').join(''), }; await next(); diff --git a/packages/iceworks-server/src/app/view/index.html b/packages/iceworks-server/src/app/view/index.html index 0b97a450c3..82ef3a3390 100644 --- a/packages/iceworks-server/src/app/view/index.html +++ b/packages/iceworks-server/src/app/view/index.html @@ -4,7 +4,7 @@ - +