2021-08-30 16:21:54 +02:00
|
|
|
const fs = require("fs");
|
2021-09-17 23:42:40 +02:00
|
|
|
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 {
|
2021-09-17 23:42:40 +02:00
|
|
|
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();
|
|
|
|
// });
|