1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-21 18:21:36 +02:00
server/api/scripts/globalSetup.js
2021-09-01 22:10:44 +02:00

15 lines
352 B
JavaScript

const fs = require("fs");
const { FosscordServer } = require("../dist/Server");
const Server = new FosscordServer({ port: 3001 });
global.server = Server;
module.exports = async () => {
try {
fs.unlinkSync(`${__dirname}/../database.db`);
} catch {}
return await Server.start();
};
// afterAll(async () => {
// return await Server.stop();
// });