1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-14 06:32:36 +01:00
server/api/scripts/globalSetup.js

16 lines
394 B
JavaScript
Raw Normal View History

2021-08-30 16:21:54 +02:00
const fs = require("fs");
const path = require("path");
2021-08-30 16:21:54 +02:00
const { FosscordServer } = require("../dist/Server");
const Server = new FosscordServer({ port: 3001 });
2021-09-01 22:10:44 +02:00
global.server = Server;
module.exports = async () => {
2021-08-30 16:21:54 +02:00
try {
fs.unlinkSync(path.join(__dirname, "..", "database.db"));
2021-08-30 16:21:54 +02:00
} catch {}
return await Server.start();
2021-09-01 22:10:44 +02:00
};
2021-08-30 16:21:54 +02:00
// afterAll(async () => {
// return await Server.stop();
// });