@gxp-dev/tools 2.0.51 → 2.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/runtime/vite.config.js
CHANGED
|
@@ -259,6 +259,14 @@ export default defineConfig(({ mode }) => {
|
|
|
259
259
|
name: "request-logger-cors",
|
|
260
260
|
configureServer(server) {
|
|
261
261
|
server.middlewares.use((req, res, next) => {
|
|
262
|
+
// Health check route
|
|
263
|
+
if (req.url === "/__health") {
|
|
264
|
+
res.statusCode = 200;
|
|
265
|
+
res.setHeader("Content-Type", "application/json");
|
|
266
|
+
res.end(JSON.stringify({ status: "ok" }));
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
262
270
|
const start = Date.now();
|
|
263
271
|
const originalEnd = res.end;
|
|
264
272
|
|
package/template/vite.config.js
CHANGED
|
@@ -208,6 +208,14 @@ export default defineConfig(({ mode }) => {
|
|
|
208
208
|
name: "request-logger-cors",
|
|
209
209
|
configureServer(server) {
|
|
210
210
|
server.middlewares.use((req, res, next) => {
|
|
211
|
+
// Health check route
|
|
212
|
+
if (req.url === "/__health") {
|
|
213
|
+
res.statusCode = 200;
|
|
214
|
+
res.setHeader("Content-Type", "application/json");
|
|
215
|
+
res.end(JSON.stringify({ status: "ok" }));
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
|
|
211
219
|
const start = Date.now();
|
|
212
220
|
const originalEnd = res.end;
|
|
213
221
|
|