Arc Forumnew | comments | leaders | submitlogin
Development/deployment utils, please improve
6 points by simonmichael 6128 days ago | 1 comment

  ; start.arc - rudimentary helpers for arc web development/deployment
  ; Set some globals and load this at the end of an app to start on a
  ; specified port or provide utilities in development mode. Eg:
  ;
  ; (= port* 8002)
  ; (= filename* "myapp.arc")
  ; (= devmode* #t)
  ; (load "start.arc")
  
  (def start () (new-thread (fn () (asv (or (errsafe port*) 8080)))))
  (def stop () (= quitsrv* 1) "server will stop after next request")
  (def reload () (load filename*))
  (if (errsafe devmode*) () (start))
Enhancements welcome. Notice you have to hit the app once more with curl after calling (stop).


2 points by almkglor 6128 days ago | link

I suggest you push this onto nex-3's arc-wiki, with some pretty serious documentation and docstrings.

-----