save wait
This commit is contained in:
parent
55d0215d02
commit
84d001c066
2 changed files with 12 additions and 4 deletions
|
@ -17,6 +17,7 @@ import { addGetMethods } from "./api/get.js";
|
||||||
import { activatePost, addPostMethods } from "./api/post.js";
|
import { activatePost, addPostMethods } from "./api/post.js";
|
||||||
import { activateWS, wsOnConnection } from "./api/ws.js";
|
import { activateWS, wsOnConnection } from "./api/ws.js";
|
||||||
import { startUpdateCert } from "./server/serverCerts.js";
|
import { startUpdateCert } from "./server/serverCerts.js";
|
||||||
|
import { wait } from "./sys/tools.js";
|
||||||
|
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
@ -98,8 +99,9 @@ async function startServer() {
|
||||||
|
|
||||||
async function complete_loaded() {
|
async function complete_loaded() {
|
||||||
startUpdateCert();
|
startUpdateCert();
|
||||||
|
await wait(500);
|
||||||
let succ = await generateTag();
|
let succ = await generateTag();
|
||||||
if(!succ) error("Outbag", "Could not resolve own Server Tag. Remote-Auth will not work! Check if the Server is reachable and the config ist correct!");
|
if(!succ) error("Outbag", "Could not check own Server Tag. Remote-Auth will not work! Check if the Server is reachable and the config ist correct!");
|
||||||
activatePost();
|
activatePost();
|
||||||
activateWS();
|
activateWS();
|
||||||
log("Server", 'Listening...');
|
log("Server", 'Listening...');
|
||||||
|
|
|
@ -15,3 +15,9 @@ export const get64 = (l: number) => {
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const wait = (ms: number) => {
|
||||||
|
return new Promise((res)=>{
|
||||||
|
setTimeout(res,ms);
|
||||||
|
})
|
||||||
|
}
|
Loading…
Reference in a new issue