File: /volume1/@appstore/Spreadsheet/server/sheet/index.js
"use strict";const{setProcessName:e}=require("../common/helper/process");e("spreadsheet-server");const o=require("fs");const r=require("./core");const{logger:s}=require("@synology-office/logger");const n=require("http").createServer();const t=new r(n);const c=require("../common/local-control")(t);const i="/run/synoffice/spreadsheet_node.sock";const f="/run/synoffice/spreadsheet_internal.sock";function u(){t.onExit().then((function(){process.exit()}))}process.on("SIGINT",u);process.on("SIGTERM",u);n.listen(i,(function(){o.chown(i,1023,1023,(e=>{if(e){s.error("failed to chown to http")}}))}));c.listen(f,(()=>{}));