mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
feat(cli-serve): add snapshotting capability (#129)
This commit is contained in:
@@ -5,6 +5,8 @@ const chalk = require('chalk');
|
||||
const webpack = require('webpack');
|
||||
const WebpackDevServer = require('webpack-dev-server');
|
||||
|
||||
const snapshotter = require('./snapshot');
|
||||
|
||||
module.exports = async ({
|
||||
host,
|
||||
port,
|
||||
@@ -19,6 +21,11 @@ module.exports = async ({
|
||||
let config;
|
||||
let contentBase;
|
||||
|
||||
const snapper = snapshotter({
|
||||
host,
|
||||
port,
|
||||
});
|
||||
|
||||
if (dev) {
|
||||
const webpackConfig = require('./webpack.build.js');
|
||||
const srcDir = path.resolve(__dirname, '../web');
|
||||
@@ -56,6 +63,8 @@ module.exports = async ({
|
||||
index: '/eHub.html',
|
||||
},
|
||||
before(app) {
|
||||
snapper.addRoutes(app);
|
||||
|
||||
app.get('/info', (req, res) => {
|
||||
res.json({
|
||||
enigma: enigmaConfig,
|
||||
|
||||
Reference in New Issue
Block a user