Arc Forumnew | comments | leaders | submitlogin
2 points by croach 6092 days ago | link | parent

One way to stop the Arc application server (i.e., app.arc or asv) is to run the server in a separate thread and kill the thread when you want to stop the server, like so:

  (= app (thread (asv)))
and, to stop it:

  (break-thread app)
This will allow you to get back to the Arc prompt without pressing stop in DrScheme.

As for your second problem, the reason you are having trouble is that you are typing in the URL for the hello operation. You need to use http://localhost:8080/hello2 instead where the portion after the / matches the name of your defop.

Hope that helps out.



1 point by globalrev 6092 days ago | link

yes ty very much.

the break though:

arc> (= app (thread (asv))) #<thread> arc> ready to serve port 8080 (break-thread app) . #<void> . ac.scm::34123: user break

-----

2 points by almkglor 6091 days ago | link

A better way is simply this:

  (thread (asv))
    (... work ...)
  (assert quitsrv*)
Then make one last request to the server (it won't terminate until that last one request, because it's stuck listening on the port. yeah, buggy)

For more info on Arc, see kens' excellent guides on http://arcfn.com http://arcfn.com/doc/index.html

-----