Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

denon [script name] doesn't kill app on reload #49

Open
Trystan-SA opened this issue May 23, 2020 · 36 comments
Open

denon [script name] doesn't kill app on reload #49

Trystan-SA opened this issue May 23, 2020 · 36 comments
Labels
bug Something isn't working

Comments

@Trystan-SA
Copy link

Trystan-SA commented May 23, 2020

I have a simple web server application running with oak. When I use the command denon run --allow-net app.ts the auto reload successfully kill the webserver on each reload.

But when I use the denon dev command and using the denon.json file, the application isn't killed on each reload. For example, if I run the webserver on 8080 port, then change it to 8081 then save, I end up with 2 webserver. If I doesn't change the port between two save, I hand up with an error saying one app already use this port.

Here is my denon.json file
01

And my app.ts file
02

@notfilippo
Copy link
Collaborator

In what os are you experiencing this issue?

@Trystan-SA
Copy link
Author

Windows 10 Pro 64 bits
Version 10.0.17763

@notfilippo
Copy link
Collaborator

I can't seem to reproduce this issue on windows. Are you using the latest version of deno? (v1.0.2)

@notfilippo notfilippo added the bug Something isn't working label May 23, 2020
@Trystan-SA
Copy link
Author

I'm using deno 1.0.2 and denon 2.0.0.
I deleted everything and rewrite only the part I give in my screenshots, same issue.

Here is the error log I got when I have two process running on the same port. The error is in French because my operating system is in French. It say "Only one usage of every socket port is authorised".

01

@eliassjogreen
Copy link
Member

If you close down deno in the task manager and try again do you still get the error? I can't seem to reproduce it. What does your path look like?

@Trystan-SA
Copy link
Author

Done it, nothing changed.
My path can be found on my last screen, 2nd line from below.

@meganyin13
Copy link

I am also having this issue on macOS Catalina using denon v2.0.0 and deno 1.0.2 with my start script:
"start": "denon run --allow-net --allow-read server/staticServer.ts"
Interesting because just using denon run command on its own works fine. However, denon [script] doesn't close the app properly on reload.
Also seems that when we get this error the whole app crashes 😕

@notfilippo
Copy link
Collaborator

@meganyin13

"start": "denon run --allow-net --allow-read server/staticServer.ts"

Hi, I tested the project you linked in this issue with my Mac, adding:

"scripts": {
  "start": "deno run --allow-net --allow-read server/staticServer.ts"
},

to the denon.json file. It seems to be working without any problems.

  • the one I used: "start": "deno run --allow-net --allow-read server/staticServer.ts"
  • the one you provided: "start": "denon run --allow-net --allow-read server/staticServer.ts"

As you can see you are making denon run a denon command which spawns two daemons instead of a deno command.

@notfilippo
Copy link
Collaborator

@Trystan-SA
Could you please try the new update (denon --upgrade). We fixed the issue for linux and macOS but we also added debug logs so we can look into this problem a bit more.
To enable debug logs please add this to your config file:

{
  "logger": {
    "debug": true
   }
}

If the problem reoccurs please write a message here with all the stdout from denon. Thanks 🌟

@Trystan-SA
Copy link
Author

Same problem, here is my console when I saved the same file without any port change (two reload on port 8080) :

01

And then my console log when I saved the file when I changed the port to 8081 instead of 8080 :
01

In the second test, the app never started on port 8081 (it crashed when I saved). But the app on the 8080 port is still running even after the crash.

@notfilippo
Copy link
Collaborator

With commit 2143585 I removed the faulty error message log. Can you please --upgrade another time?

@Trystan-SA
Copy link
Author

Still the same double port error...
01

@notfilippo
Copy link
Collaborator

I have recreated your environment in a windows vm but I can't reproduce the issue. If you have time come to our discord server so we can have a faster way of communication.

@notfilippo notfilippo added the stale This issue is stale and will be removed if no interaction is made label Jun 16, 2020
@notfilippo notfilippo changed the title denon [script name] Doesn't kill app on reload denon [script name] doesn't kill app on reload Jun 27, 2020
@FarCryFromHuman
Copy link

I'm getting the socket in use error as well:

image

And my denon.json file:

{
  "$schema": "https://deno.land/x/denon/schema.json",
  "scripts": {
    "start": {
      "cmd": "deno run server.ts",
      "allow": ["env", "net"],
      "desc": "run my app.ts file",
      "env": {
        "port": "8000"
      }
    }
  }
}

My versions:
image

My OS info:
image

@aaronwlee
Copy link

Local execution process.close() or self.close() are working well.
But if the execution path is coming from out of current dir, these two methods are causing this issue.

@eliassjogreen
Copy link
Member

eliassjogreen commented Oct 11, 2020

The current debug logs for this issue:

[*] [main] v2.4.4
[*] [daem] watching path(s): *.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run -A ./main.ts`
[&] [#0] starting process with pid 3992
[&] [daem] monitoring status of process with pid 3992
[&] [path] trying to match denon.json
[&] [path] path denon.json is matched
[&] [path] trying to match denon.json
[&] [path] path denon.json is matched
[&] [daem] reload event detected, starting the reload procedure...
[&] [main] reloading config
[*] [daem] restarting due to changes...
[&] [daem] killing 1 orphan process[es]
[&] [daem] closing (windows) process with pid 3992      
[*] [daem] watching path(s): *.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json      
[!] [#0] starting `deno run -A ./main.ts`
[&] [#0] starting process with pid 18220
[&] [daem] monitoring status of process with pid 18220  
[&] [daem] error getting status of process with pid 3992
[&] [daem] process with pid 3992 was killed
error: Uncaught AddrInUse: Only one usage of each socket address (protocol/network address/port) is normally permitted. (os error 10048)
    at processResponse (core.js:226:13)
    at Object.jsonOpSync (core.js:250:12)
    at opListen (deno:cli/rt/30_net.js:32:17)
    at Object.listen (deno:cli/rt/30_net.js:207:17)
    at Application.serve (server.ts:287:25)
    at Application.listen (application.ts:362:20)
    at main.ts:9:11
[&] [daem] got status of process with pid 18220
[&] [daem] process with pid 18220 exited on its own
[E] [daem] app crashed - waiting for file changes before starting ...

@eliassjogreen
Copy link
Member

Most likely related to deno#7824

@fzn0x
Copy link

fzn0x commented Oct 12, 2020

error: Uncaught AddrInUse: Only one usage of each socket address (protocol/network address/port) is normally permitted. (os error 10048)
    at unwrapResponse (rt/10_dispatch_json.js:24:13)
    at sendSync (rt/10_dispatch_json.js:51:12)
    at opListen (rt/30_net.js:33:12)
    at Object.listen (rt/30_net.js:204:17)
    at Object.listen (rt/40_net_unstable.js:11:18)
    at Application.serve (server.ts:287:25)
    at Application.listen (application.ts:363:20)
    at Server.run (file:///B:/projek-deno/denovel/vendor/Denovel/mod.ts:15:1)
    at file:///B:/projek-deno/denovel/server.ts:3:1
    at <anonymous> (<anonymous>)
[E] [daem] app crashed - waiting for file changes before starting ...

I'm also getting this issue while using oak server with denon.

PS: I use deno v1.3.1 and windows 10

@eliassjogreen eliassjogreen removed the stale This issue is stale and will be removed if no interaction is made label Oct 12, 2020
@mooxl
Copy link

mooxl commented Oct 14, 2020

Hey, guys,
I do not know, if it is related to the fact, that denon does not kill the previous instance, but I have the same problem, that the adress is already used. I have deno or denon running in a docker container and every time I change a file in the root folder denon is executed once more than before. See logs :

v2.4.4
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting denon start
v2.4.4
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting deno run --allow-env --allow-net --unstable main.ts
Server running on port 3000
restarting due to changes...
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting denon start
restarting due to changes...
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting deno run --allow-env --allow-net --unstable main.ts
v2.4.4
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting deno run --allow-env --allow-net --unstable main.ts
Server running on port 3000
Server running on port 3000
error: Uncaught AddrInUse: Address already in use (os error 98)
    at Object.jsonOpSync (core.js:247:13)
    at opListen (deno:cli/rt/30_net.js:32:17)
    at Object.listen (deno:cli/rt/30_net.js:207:17)
    at Object.listen (deno:cli/rt/40_net_unstable.js:11:18)
    at Application.serve (server.ts:287:25)
    at Application.listen (application.ts:362:20)
    at main.ts:12:11
    at <anonymous> (<anonymous>)
app crashed - waiting for file changes before starting ...
restarting due to changes...
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting deno run --allow-env --allow-net --unstable main.ts
restarting due to changes...
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting deno run --allow-env --allow-net --unstable main.ts
restarting due to changes...
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting denon start
Server running on port 3000
Server running on port 3000
error: Uncaught AddrInUse: Address already in use (os error 98)
    at Object.jsonOpSync (core.js:247:13)
    at opListen (deno:cli/rt/30_net.js:32:17)
    at Object.listen (deno:cli/rt/30_net.js:207:17)
    at Object.listen (deno:cli/rt/40_net_unstable.js:11:18)
    at Application.serve (server.ts:287:25)
    at Application.listen (application.ts:362:20)
    at main.ts:12:11
    at <anonymous> (<anonymous>)
app crashed - waiting for file changes before starting ...
v2.4.4
watching path(s): *.*
watching extensions: ts,tsx,js,jsx,json
starting deno run --allow-env --allow-net --unstable main.ts
Server running on port 3000
error: Uncaught AddrInUse: Address already in use (os error 98)
    at Object.jsonOpSync (core.js:247:13)
    at opListen (deno:cli/rt/30_net.js:32:17)
    at Object.listen (deno:cli/rt/30_net.js:207:17)
    at Object.listen (deno:cli/rt/40_net_unstable.js:11:18)
    at Application.serve (server.ts:287:25)
    at Application.listen (application.ts:362:20)
    at main.ts:12:11
    at <anonymous> (<anonymous>)
app crashed - waiting for file changes before starting ...

deno 1.4.6
v8 8.7.220.3
typescript 4.0.3
denon 2.4.4

@xsonic
Copy link

xsonic commented Oct 16, 2020

Same Problem on Windows 10 Pro.

[*] [main] v2.4.4
[*] [daem] watching path(s): *.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run -A index.ts`
[&] [#0] starting process with pid 18016
[&] [daem] monitoring status of process with pid 18016
[&] [path] trying to match index.ts
[&] [path] path index.ts is matched
[&] [path] trying to match index.ts
[&] [path] path index.ts is matched
[&] [path] trying to match .idea\workspace.xml
[&] [path] path .idea\workspace.xml does not have right extension
[&] [path] trying to match .idea\workspace.xml
[&] [path] path .idea\workspace.xml does not have right extension
[&] [daem] reload event detected, starting the reload procedure...
[*] [daem] restarting due to changes...
[&] [daem] killing 1 orphan process[es]
[&] [daem] closing (windows) process with pid 18016
[*] [daem] watching path(s): *.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run -A index.ts`
[&] [#0] starting process with pid 14788
[&] [daem] monitoring status of process with pid 14788
[&] [daem] error getting status of process with pid 18016
[&] [daem] process with pid 18016 was killed
Check file:///E:/www/test/deno-test-1/index.ts
error: Uncaught AddrInUse: Only one usage of each socket address (protocol/network address/port) is normally permitted. (oserror 10048)
  at processResponse (core.js:226:13)
  at Object.jsonOpSync (core.js:250:12)
  at opListen (deno:cli/rt/30_net.js:32:17)
  at Object.listen (deno:cli/rt/30_net.js:207:17)
  at Application.serve (server.ts:287:25)
  at Application.listen (application.ts:362:20)
  at index.ts:27:11
[&] [daem] got status of process with pid 14788
[&] [daem] process with pid 14788 exited on its own
[E] [daem] app crashed - waiting for file changes before starting ...

deno 1.4.6
v8 8.7.220.3
typescript 4.0.3
denon 2.4.4

@topstop3416
Copy link

denon-error-10048

{
"$schema": "https://deno.land/x/denon/schema.json",
"scripts": {
"start": {
"cmd": "deno run -A ./src/app.ts",
"desc": "run my app.ts file"
}
},
"watcher": { "match": ["**/."] },
"logger": {
"debug": true
}
}

deno 1.5.1
v8 8.7.220.3
typescript 4.0.3

@MustachedNinja
Copy link
Contributor

I had a similar issue to this. I made a simple oak server which just returns "Hello World" and whenever I would make a change and restart the server, I would get the AddrInUse error

My Code:

server.ts

import * as log from "https://deno.land/std@0.77.0/log/mod.ts";
import { Application, Router, RouterContext } from "https://deno.land/x/oak@v6.3.2/mod.ts";

const app = new Application();
const router = new Router();

router.get('/', (ctx: RouterContext) => {
    ctx.response.body = "Hello World";
});

app.use(router.routes());
app.use(router.allowedMethods());

app.addEventListener('listen', ({ hostname, port, secure }) => {
    log.info(`Listening on ${secure ? 'https://' : 'http://'}${hostname || "localhost"}:${port}`)
});

await app.listen({ port: 3000 });

scripts.json

{
  "$schema": "https://deno.land/x/denon/schema.json",
  "scripts": {
    "start": {
      "cmd": "deno run server.ts",
      "allow": ["net"],
      "desc": "run my app.ts file"
    }
  },
  "logger": {
    "quiet": false,
    "debug": true
  }
}

Error Log:

[*] [main] v2.4.4
[*] [daem] watching path(s): *.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run --allow-net server.ts`
[&] [#0] starting process with pid 17392
[&] [daem] monitoring status of process with pid 17392
Listening on http://localhost:3000
[&] [path] trying to match server.ts
[&] [path] path server.ts is matched
[&] [path] trying to match server.ts
[&] [path] path server.ts is matched
[&] [daem] reload event detected, starting the reload procedure...
[*] [daem] restarting due to changes...
[&] [daem] killing 1 orphan process[es]
[&] [daem] closing (windows) process with pid 17392
[*] [daem] watching path(s): *.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run --allow-net server.ts`
[&] [#0] starting process with pid 15416
[&] [daem] monitoring status of process with pid 15416
[&] [daem] error getting status of process with pid 17392
[&] [daem] process with pid 17392 was killed
Check file:///C:/Users/{{USER}}/Programming/Deno/survey-app/server.ts
error: Uncaught AddrInUse: Only one usage of each socket address (protocol/network address/port) is normally permitted. (os error 10048)
    at processResponse (core.js:224:13)
    at Object.jsonOpSync (core.js:248:12)
    at opListen (deno:cli/rt/30_net.js:32:17)
    at Object.listen (deno:cli/rt/30_net.js:207:17)
    at Application.serve (server.ts:287:25)
    at Application.listen (application.ts:362:20)
    at server.ts:17:11
[&] [daem] got status of process with pid 15416
[&] [daem] process with pid 15416 exited on its own
[E] [daem] app crashed - waiting for file changes before starting ...

What I did:

I decided to try and figure out what the issue was by pulling the code from the github repo and modifying it locally. After pulling, I took a quick look over the code and ran deno install --unstable --allow-read --allow-write --allow-run -f denon.ts. I verified that I was getting version 2.4.4, and tried running denon start on my project and tried restarting the project as usual, and it succeeded:

C:\Users\{{USER}}\Programming\Deno\survey-app>denon start
[*] [main] v2.4.4
[*] [daem] watching path(s): **/*.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run --allow-net server.ts`
[&] [#0] starting process with pid 23148
[&] [daem] monitoring status of process with pid 23148
INFO Listening on http://localhost:3000
[&] [path] trying to match server.ts
[&] [path] path server.ts is matched
[&] [path] trying to match server.ts
[&] [path] path server.ts is matched
[&] [daem] reload event detected, starting the reload procedure...
[*] [daem] restarting due to changes...
[&] [daem] killing 1 orphan process[es]
[&] [daem] closing (windows) process with pid 23148
[*] [daem] watching path(s): **/*.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run --allow-net server.ts`
[&] [#0] starting process with pid 21312
[&] [daem] monitoring status of process with pid 21312
[&] [daem] error getting status of process with pid 23148
[&] [daem] process with pid 23148 was killed
Check file:///C:/Users/{{USER}}/Programming/Deno/survey-app/server.ts
INFO Listening on http://localhost:3000
[&] [path] trying to match server.ts
[&] [path] path server.ts is matched
[&] [path] trying to match server.ts
[&] [path] path server.ts is matched
[&] [daem] reload event detected, starting the reload procedure...
[*] [daem] restarting due to changes...
[&] [daem] killing 1 orphan process[es]
[&] [daem] closing (windows) process with pid 21312
[*] [daem] watching path(s): **/*.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `deno run --allow-net server.ts`
[&] [#0] starting process with pid 15332
[&] [daem] monitoring status of process with pid 15332
[&] [daem] error getting status of process with pid 21312
[&] [daem] process with pid 21312 was killed
Check file:///C:/Users/{{USER}}/Programming/Deno/survey-app/server.ts
INFO Listening on http://localhost:3000

@dennisschott
Copy link

Still the same os error 10048 on Windows 10 Pro with Denon v2.4.4 :(

Windows 10 Pro 20H2
Deno 1.5.2
Denon 2.4.4

@Tzahile
Copy link

Tzahile commented Nov 21, 2020

I get this bug too,
win10
deno 1.5.3
denon 2.4.5

@MustachedNinja Can you offer a PR to fix this issue?

I noticed this bug happens when I set a scripts.config.ts.
After deleting scripts.config.ts file and running denon run .\src\index.ts again, denon didn't crash on save.

// scripts.config.ts
import { DenonConfig } from "https://deno.land/x/denon/mod.ts";

const config: DenonConfig = {
  env: {
    DENO_DIR: "./deno_dir",
  },

  scripts: {
    cache: {
      cmd: "deno cache src/index.ts --lock-write",
      desc: "Caches all deps and locks them in .lock file",
      lock: "./lock.json",
      watch: false,
    },
    serve: {
      cmd: "deno run src/index.ts",
      desc: "run my app.ts file in DEV mode",
      watch: true,
      allow: {
        net: true,
      },
      env: {
        DEV: "true",
      },
    },

    start: {
      cmd: "deno run src/index.ts",
      desc: "run my app.ts file in PROD mode",
      allow: {
        net: true,
      },
      watch: false,
    },
  },
  watcher: {
    exts: ["js", "ts", "json"],
    match: ["src/**/*.*"],
    skip: ["./lock.json"],
  },
};

export default config;

@MustachedNinja
Copy link
Contributor

I finally had some free time to take a look at the bug, and it looks like it was patched in version 2.4.5
When you're installing, change their default install text to use version 2.4.5 instead of 2.4.4, and it should work. I tried a fresh install of denon 2.4.5 with deno 1.5.2 and it restarts just fine now.

@dennisschott
Copy link

I can confirm, that it works with 2.4.5 on W10.

@MikaelPorttila
Copy link

Having this issue on Win 10 LTSC, Deno 1.6.2 and Denon 2.4.5:

image

@Conando025
Copy link

Having the same issue also with Win 10, Deno 1.6.2, Denon 2.4.5

@Skitch90
Copy link

Skitch90 commented Jan 4, 2021

Same issue with

  • Windows 10 Home (version 20H2, build 19042.685)
  • Deno 1.6.3
  • Denon 2.4.5

@dale-roberts
Copy link

I have also confirmed this to still be a problem, using Windows 10, Deno 1.6.3, and Denon 2.4.5. I believe the problem is that when the killAll() routine in deamon.ts calls p.close() under Windows, this is not actually killing the process. Can confirm this with ProcessExplorer, and see that the original process ID is never killed, and subsequent processes die due to the Socket reuse error.

I'm not a Github guru, so I'm just posting my small change here, adding p.kill() to the Windows case, which fixes the problem for me.

if (Deno.build.os === "windows") {
     logger.debug(`closing (windows) process with pid ${p.pid}`);
     p.close(); // This original line does NOT end the process.
     p.kill(9); // <<<<<< This added line DOES end the Windows process.
} else {
     logger.debug(`killing (unix) process with pid ${p.pid}`);
     p.kill(9);
}

Could also just get rid of the whole "if" and use kill() always. But I'm sure p.close() was added specially for Windows for some reason, and based on other reports here it seems to sometimes work, so I'm not sure why it is not working for all of us. I'm also not sure whether kill() has any bad/unintended effects in Windows.

@MustachedNinja
Copy link
Contributor

Thanks @dale-roberts , I submitted a pull request for your suggestion: #120

@kelvin0712
Copy link

Hi, I am not sure about the reason but I am still having this problem on Window 10 Pro, Denon: 2.4.7 and I just have a simple config.
image

@ablause
Copy link

ablause commented Apr 16, 2021

Hi, I have the same problem again. I have tested several startup configurations but nothing works.
I use Deno 1.9.0, Denon 2.4.7 and Windows 10 Pro (build: 21359.1).

Furthermore, I also tried to downgrade Deno to 1.6.3, but I have another error:

error: TS2339 [ERROR]: Property 'host' does not exist on type 'NetPermissionDescriptor'.
              return pd.host
                        ~~~~
    at https://deno.land/std@0.85.0/permissions/mod.ts:17:25

TS2339 [ERROR]: Property 'host' does not exist on type 'NetPermissionDescriptor'.
                ? `--allow-${pd.name}=${pd.host}`
                                           ~~~~
    at https://deno.land/std@0.85.0/permissions/mod.ts:18:44

Found 2 errors.

Edit: for the error with Deno 1.6.3, I found #122.

@Trystan-SA
Copy link
Author

Same problem than last year. Deno 1.9.0. Denon 2.4.7. Windows 10 Pro (1.0.0.19041)

scripts.json

 {
    "$schema": "https://cdn.deno.land/denon/versions/2.4.7/raw/schema.json",
    "scripts": {

        "dev":{
            "watch": true,
            "allow": ["net", "read", "write", "env"],
            "cmd": "deno run --unstable ./Server/Server.ts",
            "log": "info",
            "env": {
                "isdev":"dev"
            }
        },


        "compile": {
            "watch": false,
            "cmd": "deno compile --unstable --allow-net --allow-read --allow-write --allow-env ./Server/Server.ts"
        }
    },

    "watcher": {
        "interval": 500,
        "exts": [
            "ts",
            "tsx",
            "json"
        ]
    }
}

Server.ts

import { Application } from "https://deno.land/x/oak/mod.ts";

const app = new Application();

app.use(async (context)=>{
    await context.send({
        root: `${Deno.cwd()}/Client/Dist/`,
        index: 'index.html'
    })
})

console.log("App listening to http://localhost:8080")
await app.listen("localhost:8080");

Console screen (first launch & reload with save)

01

@ablause
Copy link

ablause commented Apr 19, 2021

The error occurs only with Oak for me. I tried to compare other HTTP modules, but I can't find anything strange. The process closes every other time.

With the command deno run --watch ${script}, everything works fine. Couldn't Denon use the Deno functionality directly?

@Trystan-SA
Copy link
Author

For me it also occurs with the built-in deno http module (and with oak too).

I finished by writing my own watch script like so :

const watcher = Deno.watchFs("./Server");
let LastReload : Date = new Date();

let Process : Deno.Process
Launch_Process()

for await (const event of watcher){
    if((LastReload.getTime() + 1000) < new Date().getTime()){
        LastReload = new Date()

        Kill_Process()
        Launch_Process()
    
    }
}


function Launch_Process(){
    Process = Deno.run({
        cmd: ["deno", "run", "--unstable", "-A", "Server/Server.ts"]
    }) 
}

function Kill_Process(){Process.close()}

And everything work well now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests