Next.js+React web interface for controlling HAProxy clusters (groups of servers), in conjunction with with https://gitgud.io/fatchan/haproxy-protection.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

12 lines
250 B

const { MongoClient } = require('mongodb');
module.exports = {
connect: async () => {
const client = new MongoClient(process.env.DB_URL);
await client.connect();
module.exports.client = client;
module.exports.db = client.db('test');
}
}