Wavelet
Internal name: fx-wavelet
Service Oriented nodejs application with a visual tool.
Installation
npm install -g wavelet
Usage
Usage: wavelet [action] [options]Action:start [app] [options] start an applicationapp: application path, by default: current working directoryoptions:--config: the wavelet configuration file, by default {your app}/app.js--root: the web app root--port: the web app port--disableEditor: disable the application visual editor--disableRED: disable the application visual editorSome plugins accept the options from command line, check your plugin manual to see which options you can put here.create [app] [options] create a wavelet projectapp: the name of the applicationoptions:-g: use global repositoryinstall [plugin name] [version] [options] install plugin or waveletplugin name: optional, the plugin or wavlet to install,
Example of Usage: Start wavelet application located at current directory: your_app_folder
cd your_app_folderwavelet start
Start wavelet application by specifying your app location
wavelet start your_app_folder
Create a wavelet application: testApp
wavelet create testApp
Install all the plugins/dependences on application folder
cd your_app_folderwavelet install
Check wavelet version
wavelet -v
global variable registered
Wavelet inherits the gloabl variables defined in fx-runtime. Besides, it registers the following global variables:
_waveletVersion
the current wavelet version
_root
the web app root. All your web routes registered in your plugin must have a prefix of _root
For example
webapp; webapp;
It could be configured in config file or through command line argument --root
Format of config file
Wavelet config file could be a json or a js file, or any nodejs requirable files. Config file must return a json object with following fields:
- apps: [optional] the list of application plugin
- home: the home path of your application, usually __dirname
- root: the root web path, default: ''
- binding: [optional] service implementation binding, if you have multiple implementation of same service, use this binding to choose the one you want to use
- pluginSearchPaths: a list of paths to locate your plugins
- defaultPluginConfig: default plugin configs. [JSON object], key is the plugin name, value is the config object
- whiteList: [optional] the white list of plugin
- blackList: [optional] the black list of plugin
Example:
moduleexports ="home": __dirname"pluginSearchPaths":__dirname + '/plugins'__dirname + '/../../fx-plugins'"defaultPluginConfig":"fx-mongodb":;