Datasole is based on (and abstracts; opinionates): Webpack, Express, and Websockets connections. It works well with frontend frameworks that support reacting to mutations on a shared data model, such as Vue, Angular, and React.
In development mode, Datasole allows full-stack applications to be interactively developed with the following features:
.vuesingle-file Vue.js components
datasole build command runs the Webpack build in production mode to produce a static web distribution in the
dist directory by default.
npm install -g datasole
Datasole can also be used as a locally installed library by omitting the
Each command attempts sensible defaults. Help for each option:
Start a new project by running
datasole init in an empty directory.
Start a development webserver:
Build a production version of the frontend:
Serve a production version of the frontend:
datasole run (requires
datasole build first)
The following environment variables affect Datasole's behavior. No environment variables are required by default.
lib/config/defaults.js for the full list of environment variables.
Required variables, with defaults:
||Strip ANSI color codes from log messages.|
||URL path to forward to application as REST requests.|
||Maximum number of seconds before timing out an HTTP request.|
||Local address to listen on (
||Datasole user application logging level.|
||Datasole system runtime logging level.|
||Datasole run mode:
||Port to listen on.|
||Path to serve a fallback static distribution at.|
||URL prefix for all paths, useful for path-based proxies.|
||Relative path to listen for Websocket connections.|
Optional variables, enables specific features if set (default: not set):
|DATASOLE_LOG_OUTPUT_PATH||Disk path to write logs to, or write to console if blank.|
|DATASOLE_STATIC_PATH||Fallback static distribution disk path to attempt before error page.|
|DATASOLE_BUILTIN_TEMPLATE_PATH||Override path containing Pug templates for built-in error pages.|
All server URLs will be prefixed by
DATASOLE_URL_ROOT_PATH. This is useful, e.g., behind a reverse proxy like nginx where different path prefixes map to different upstream backend servers, or behind cloud load balancers.
All other paths (e.g.,
The following logging levels are supported for
If the SPA does not contain a particular URL, Datasole optionally falls back to a static web distribution on disk.
DATASOLE_STATIC_PATH variable is set, any files at that path will be served as static content.
See the datasole-examples repository.
devDependenciesbecause recursive devDependencies are not currently installed by npm, and Webpack is required for developing the client and server components of any project. In the future, Webpack and other large dev dependencies can be moved to
devDependenciesby requiring a global npm install of
|Total lines of code||4129|
|Source lines||3069 (74%)|
|Installed node_modules size||188M|