@arkstack/driver-express 0.12.34 → 0.12.35

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/dist/index.d.ts CHANGED
@@ -70,6 +70,11 @@ declare class ExpressDriver extends ArkstackKitDriver<Express, Handler> {
70
70
  /**
71
71
  * Starts the Express server on the specified port.
72
72
  *
73
+ * The bind host can be overridden with the `APP_HOST` (or `HOST`) env
74
+ * variable. It defaults to `0.0.0.0` so the server is reachable on all
75
+ * network interfaces, which platforms like Railway require for their
76
+ * healthcheck proxy to reach the app.
77
+ *
73
78
  * @param app
74
79
  * @param port
75
80
  */
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import express from "express";
2
2
  import { Arkstack, ArkstackKitDriver } from "@arkstack/contract";
3
- import { ErrorHandler, Logger, RequestException, isClass, renderError } from "@arkstack/common";
3
+ import { ErrorHandler, Logger, RequestException, env, isClass, renderError } from "@arkstack/common";
4
4
  import { Request as Request$1 } from "clear-router";
5
5
  import { definePlugin } from "clear-router/core";
6
6
  import { definePlugin as definePlugin$1 } from "kanun";
@@ -1387,13 +1387,19 @@ var ExpressDriver = class extends ArkstackKitDriver {
1387
1387
  }
1388
1388
  /**
1389
1389
  * Starts the Express server on the specified port.
1390
- *
1391
- * @param app
1392
- * @param port
1390
+ *
1391
+ * The bind host can be overridden with the `APP_HOST` (or `HOST`) env
1392
+ * variable. It defaults to `0.0.0.0` so the server is reachable on all
1393
+ * network interfaces, which platforms like Railway require for their
1394
+ * healthcheck proxy to reach the app.
1395
+ *
1396
+ * @param app
1397
+ * @param port
1393
1398
  */
1394
1399
  start(app, port) {
1395
- app.listen(port, () => {
1396
- Logger.log([["Server is running on", "white"], [`http://localhost:${port}`, "cyan"]], " ");
1400
+ const host = env("APP_HOST", env("HOST", "0.0.0.0"));
1401
+ app.listen(port, host, () => {
1402
+ Logger.log([["Server is running on", "white"], [`http://${host}:${port}`, "cyan"]], " ");
1397
1403
  });
1398
1404
  }
1399
1405
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/driver-express",
3
- "version": "0.12.34",
3
+ "version": "0.12.35",
4
4
  "type": "module",
5
5
  "description": "Express driver for Arkstack, providing Express-based runtime integration for the framework.",
6
6
  "homepage": "https://arkstack.toneflix.net",
@@ -42,13 +42,13 @@
42
42
  "express-rate-limit": "^8.4.1",
43
43
  "@resora/plugin-clear-router": "^1.0.62",
44
44
  "resora": "^1.3.25",
45
- "@arkstack/contract": "^0.12.34"
45
+ "@arkstack/contract": "^0.12.35"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "express": "^5.2.1",
49
- "@arkstack/auth": "^0.12.34",
50
- "@arkstack/foundry": "^0.12.34",
51
- "@arkstack/common": "^0.12.34"
49
+ "@arkstack/foundry": "^0.12.35",
50
+ "@arkstack/auth": "^0.12.35",
51
+ "@arkstack/common": "^0.12.35"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "@arkstack/auth": {