asljs-board-srv
v0.1.2
Published
The board-srv web server: the board and its items in an editor, rendered in the browser.
Readme
board-srv
Part of Alexandrite Software Library - a set of high-quality, performant JavaScript libraries and tools for everyday use.
Overview
asljs-board-srv is the board-srv web server: the editor of asljs-ui-editor
with the board as its plugin, the board in a column per stage, a card per
document, each document rendered, and a selector of the boards when it finds
several. The server answers data, the board as JSON and the documents as their
markdown text; the plugin renders them in the browser.
Installation
npm install asljs-board-srvUsage
board-srv --working-dir boards --port 8080serves the boards of boards until SIGINT (Ctrl+C) or SIGTERM: the folder
itself when it has a board.json, else every folder below it with one, each a
board of its own. --working-dir is the current directory by default. Each
board is configured by its own board.json; no option sets a board's folders.
Without --port it takes port of the nearest board.json of the folder, else
the first free port from 3000 on; it prints the address it listens on.
import { createApp }
from 'asljs-board-srv';createApp(context) makes the board application, an EditorApp of
asljs-appbase served at context.base, alone or in a server of several
applications, its projects found in context.cwd (findProjects). main(args,
io) is the board-srv executable, which serves it at / with serveApp of
asljs-appbase.
Further reading
- board-srv - what the server serves, its port, and its options.
Related packages
- asljs-board-cli - the
boardcommand line. - asljs-board - the board model and the commands as functions.
License
See LICENSE for details.
