17 lines
458 B
JavaScript
17 lines
458 B
JavaScript
import Rabbiteer from "rabbiteer";
|
|
import buildWorkers from "./workers/index.js";
|
|
|
|
// Pull Environment Variables
|
|
const { RABBIT_HOST: host, RABBIT_USER: user, RABBIT_PASS: pass } = process.env;
|
|
|
|
// Rabbit Config
|
|
const rabbitConfig = {
|
|
host: host ?? "localhost",
|
|
user: user ?? "rabbit",
|
|
pass: pass ?? "rabbit",
|
|
};
|
|
|
|
const buildRabbiteer = (skio) =>
|
|
new Rabbiteer(null, buildWorkers(skio), { autoRabbit: rabbitConfig });
|
|
|
|
export default buildRabbiteer;
|