1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-22 10:41:34 +02:00
server/api/scripts/globalSetup.js

15 lines
352 B
JavaScript
Raw Normal View History

2021-08-30 16:21:54 +02:00
const fs = require("fs");
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 {
2021-09-01 22:10:44 +02:00
fs.unlinkSync(`${__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();
// });