Question: I've read about the splice method for my todo list app but I don't know why this doesn't work.
<https://codepen.io/dev999/pen/XRzMwx> Could anyone please tell me how to fix my splice method so that it deletes the right to do item? Thank you! So far it seems to only delete the first item no matter what

```
function dele (position, amount) {
      var amount = 1; 
    var position = 
    ((parseInt(prompt("What is the number of the item you want to     delete?")))+1);
    var position = todo[position];

    todo.splice(position, amount);
  }

```

Answer: 
You can always `CTRL-C` in the terminal window to stop the server.

You could also `ps aux | grep StanfordCoreNLPServer` to find the pid and then kill the process manually.

When the server is started it should create a shutdown key and you can send that message to the server to close the server. This isn't working on my Macbook Pro (maybe a permission issue ??) but I've seen it work on other machines.

Here is the command:

```
wget "localhost:9000/shutdown?key=`cat /tmp/corenlp.shutdown`" -O -

```

Note the shutdown key is stored at `/tmp/corenlp.shutdown`

If you use the the `-server_id server0` option the shutdown key will be stored at this path `/tmp/corenlp.shutdown.server0`
If you just want to kill the process. You can use lsof command. 

```
#install lsof if missing
sudo apt install lsof

```

You can find the pid of CoreNLP using 

```
lsof -i:9000

```

Replace 9000 with the port you used to run the server.

The output looks like 

```
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    15867 XXXX   XXX  IPv6 XXXXXX      0t0  TCP *:9000 (LISTEN)

```

Use the pid from here and run.

```
kill 15867

```

PID of my server process is 15867.