[OCaml] High Intensity Training Online
build exclude local dev dirs from dune watch tree
The dev server writes its SQLite database to the repo root by default. Under `dune exec -w`, each write retriggers a rebuild and restart, and the restart writes to the database again, so the server never stays up long enough to answer a request. Login and every other page returned an empty reply. Exclude local_db/ and local/ from the tree dune scans, so a relocated dev database (HITO_DB=sqlite3:local_db/hito.sqlite) no longer triggers the restart loop. Both paths are already gitignored.
dune
@@ -0,0 +1,4 @@
1
Added:
; Keep local dev runtime data out of the build/watch tree. The dev server's
2
Added:
; SQLite database lives in local_db/; without this exclusion, each write
3
Added:
; retriggers `dune -w`, restarting the server in a loop.
4
Added:
(dirs :standard \ local_db local)