@rpcbase/server 0.425.0 → 0.427.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.425.0",
3
+ "version": "0.427.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "scripts": {
package/src/initServer.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { Application } from "express"
2
- import env from "@rpcbase/env"
3
2
  import session, { SessionOptions } from "express-session"
4
3
  import {RedisStore} from "connect-redis"
5
4
  import {createClient} from "redis"
6
5
  import requestIp from "request-ip"
6
+ import env from "@rpcbase/env"
7
+ import { initApiClient } from "@rpcbase/client"
7
8
 
8
9
  // dotenv setup, merge process env with vite process.env file
9
10
  process.env = {
@@ -19,7 +20,9 @@ import { metricsIngestProxyMiddleware } from "./metricsIngestProxyMiddleware"
19
20
  const isProduction = process.env.NODE_ENV === "production"
20
21
 
21
22
 
22
- export const initServer = async (app: Application, serverEnv: { [key: string]: string | undefined }) => {
23
+ export const initServer = async (app: Application, serverEnv: { [key: string]: string | undefined }) => {
24
+ await initApiClient({app})
25
+
23
26
  app.disable("x-powered-by")
24
27
 
25
28
  app.set("trust proxy", true)