[Spec Kit] Implementation progress
This commit is contained in:
@@ -9,6 +9,7 @@ import { v4 as uuidv4 } from "uuid";
|
||||
import jwt from "jsonwebtoken";
|
||||
import { create as xmlBuilder } from "xmlbuilder2";
|
||||
import { logger } from "./logger.js";
|
||||
import { createClient } from "redis";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -122,6 +123,11 @@ function validateConfig(config) {
|
||||
*/
|
||||
async function startServer() {
|
||||
try {
|
||||
// Connect Redis client before loading global variables
|
||||
const redisClient = createClient();
|
||||
await redisClient.connect();
|
||||
globalVMContext.redis = redisClient;
|
||||
|
||||
// Load configuration into global.config
|
||||
global.config = loadConfig();
|
||||
|
||||
@@ -143,7 +149,7 @@ async function startServer() {
|
||||
validateConfig(global.config);
|
||||
logger.info("Configuration validated successfully");
|
||||
|
||||
const proxyPath = join(__dirname, "proxyScripts", "proxy.js");
|
||||
const proxyPath = join(__dirname, "proxyScripts", "kmeContentSourceAdapter.js");
|
||||
const proxyCode = readFileSync(proxyPath, "utf-8");
|
||||
const script = new vm.Script(proxyCode, { filename: "proxy.js" });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user