3 nitweb - provide a web API to nit model and source code.
8 nitweb [*options*] FILE...
13 `nitweb` use `nitcorn` actions to provide an API to loaded model and source code.
18 nitweb --host localhost --port 3000 lib/core/
22 Show the home page of the webserver.
23 Display all the loaded model entities in a tree.
25 ### `GET /search/:namespace` SEARCH BY NAMESPACE
26 Search all model entities matching `namespace`.
28 It is possible to retrieve the result as a JsonArray instead of raw html
29 using the uri param `json=true` (default `false`).
31 ### `GET /code/:namespace` SHOW SOURCE CODE
32 Display the source code of the entity matching `namespace`.
34 ### `GET /doc/:namespace` DOCUMENTATION PAGE
35 Display a short documentation page about the entity matching `namespace`.
37 ### `GET /random/` RANDOM LIST
38 Display a random list of entities found in the model.
40 The list is parametrable with the following uri params:
41 * `n=10` size of the list (default `10`)
42 * `k=modules` kind of entities in the list (default `modules`)
44 It is possible to retrieve the result as a JsonArray instead of raw html
45 using the uri param `json=true` (default `false`).
50 The host to bind the web server on.
55 ### `-h`, `-?`, `--help`
56 Show Help (the list of options).