import { runQuirrel } from "..";
import { createRedisFactory } from "../shared/create-redis";
export async function run(backend, config) {
    var _a;
    const redisFactory = createRedisFactory(backend === "Redis"
        ? (_a = process.env.REDIS_URL) !== null && _a !== void 0 ? _a : "redis://localhost:6379"
        : undefined);
    const { httpServer, close, server } = await runQuirrel({
        port: 0,
        redisFactory,
        disableTelemetry: true,
        logger: "none",
        ...config,
    });
    const redis = redisFactory();
    return {
        teardown: close,
        server: httpServer,
        app: server,
        redis,
    };
}
//# sourceMappingURL=runQuirrel.js.map