From 47b5f3127ae805c2c44d4c7e3b25434d2187e60f Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Tue, 5 Feb 2019 19:07:34 +0200 Subject: [PATCH] set socket mode --- server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.js b/server.js index bf1a757..2e6630d 100644 --- a/server.js +++ b/server.js @@ -55,6 +55,11 @@ async function init () { app.listen(sock, function () { console.log('Started server on', sock) }) + + try { + await fsPromises.access(sock, fs.constants.F_OK) + await fsPromises.chmod(sock, 0o777) + } catch (e) {} } module.exports = init