Liking cljdoc? Tell your friends :D

com.moclojer.server


create-watcherclj

(create-watcher *router & {:keys [config-path mocks-path]})

Creates a file watcher that monitors changes in the configuration and mocks files. When changes are detected, it automatically rebuilds and updates the router.

Parameters:

  • *router: An atom containing the current router configuration.
  • config-path: The path to the main configuration file.
  • mocks-path: The path to the directory containing mock files.

Returns: A watcher object that can be used to stop the watching process if needed.

Side effects:

  • Sets up file watchers for both config and mocks files.
  • Automatically updates the router when changes are detected.
Creates a file watcher that monitors changes in the configuration and mocks files.
When changes are detected, it automatically rebuilds and updates the router.

Parameters:
- *router: An atom containing the current router configuration.
- config-path: The path to the main configuration file.
- mocks-path: The path to the directory containing mock files.

Returns:
A watcher object that can be used to stop the watching process if needed.

Side effects:
- Sets up file watchers for both config and mocks files.
- Automatically updates the router when changes are detected.
sourceraw docstring

host-middlewareclj

(host-middleware handler-fn)
source

reitit-routerclj

(reitit-router *router)
source

start-server!clj

(start-server! *router)
source

start-server-with-file-watcher!clj

(start-server-with-file-watcher! {:keys [config-path mocks-path]})

Starts the moclojer server with an integrated file watcher.

The file watcher monitors changes in the configuration and mocks files, automatically updating the server's behavior when changes are detected.

Side effects:

  • Starts the server
  • Sets up file watchers for both config and mocks files.
  • Automatically updates the server configuration when file changes are detected.
Starts the moclojer server with an integrated file watcher.

The file watcher monitors changes in the configuration and mocks files,
automatically updating the server's behavior when changes are detected.

Side effects:
  - Starts the server
  - Sets up file watchers for both config and mocks files.
  - Automatically updates the server configuration when file changes are detected.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close