Service exposing functionality to the Man-Bun engine for UI design time and runtime work with CoreUI js and css components
Command line api
-
start
-
create my-new-component-name
HTTP API services
-
/...: return component as static content fetch - js, css, png, img, woff.
-
/cmpntsearch: return a list of components satisfying criteria
The component developer installed service is implemented as a nodejs server. The production installed service is implemented across tightly coupled nginx/nodejs servers.
Parameters for port use and file system access are passed on the command line.
During development, the node service alone can be used. It also supports static content serving.
You should be familiar with NodeJS before proceeding.
Usage
There are multiple launch mechanisms.
Launch from anywhere
Start http service
nextgenui-cli start hostname port static_content_root log_level e.g: nextgenui-cli start localhost 8081 /Users/johnn/Tools/git2/nextgenui/CoreUIService/tests/data debug
This is a long running process. It remains in the open terminal. Use the Docker launch for a detached process.
Use command line services
nextgenui-cli create component_name [error|warn|info|debug]
This creates a simple, fully functional component, with mocks, tests, etc. Creates a child folder with name component_name, populates it with the UI component app, runs npm init
Launch from within the package
npm start
Node defaults to run on localhost:8081, with error level logging. Static content path must be provided through npm config set
The start params ( host, port, staticroot, loglevel) can be set through npm: npm config set @johnn3/man-bun-cli:host venglnx109 npm config set @johnn3/man-bun-cli:port 3000 npm config set @johnn3/man-bun-cli:staticroot /Users/johnn/Tools/git2/nextgenui/CoreUIService/tests/data npm config set @johnn3/man-bun-cli:loglevel debug
Or command line (within project): node cli start host port file_js_root loglevel
e.g: node cli start localhost 8081 /Users/johnn/Tools/git2/nextgenui/CoreUIService/tests/data debug
Search
Initial(current) implementation returns an array list of all components having a manifest.json . values are the manifest.json Future step is to add filters
Test
cd node jasmine tests/httpapi_J.js --random=false mocha tests/fileutils_M.js mocha tests/component_M.js mocha tests/nodeservice_M.js
Simple manual is my system alive?
- File fetch, static content: http://xxx:8081/core/actions.js
- Unrecognised operation: http://xxx:8081/abc
- NodeJS work: http://xxx:8081/cmpntsearch