Fix main process detect, refine lock, remove axios
This commit is contained in:
parent
9f40085899
commit
07de2fab78
8 changed files with 87 additions and 190 deletions
5
index.js
5
index.js
|
|
@ -1,12 +1,11 @@
|
|||
import { config } from "dotenv";
|
||||
import http from "http";
|
||||
import listener from "./src/client.js";
|
||||
import { fileURLToPath } from "url";
|
||||
import { isMainProcess } from "./src/util.js";
|
||||
|
||||
// development endpoint (use ngrok)
|
||||
const server = http.createServer(listener);
|
||||
|
||||
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
||||
if (isMainProcess(import.meta.url)) {
|
||||
config();
|
||||
const port = parseInt(process.env.HTTP_PORT || "3000");
|
||||
server.listen(port, function () {
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue