Nebula serve

Run a nebula visualization with a basic web development server

Usage

nebula serve

Example

Connect to enigma on port 9077 to start the server

nebula serve --enigma.port 9077

Start the server without building the visualization

nebula serve --build false

Start the server and set a generic object type with sn-table

nebula serve --type sn-table

Start the server with a nebula configuration json file in a new path

nebula serve --type combochart --config config/my-nebula-config.js

Options

ParameterDescriptionDefault
--versionShow version number
--config, -c stringSet path to JSON config file"nebula.config.js"
--entry stringSet file entrypoint
--type stringSet generic object type
--buildBuild the nebula visualization into /dist dictionarytrue
--host string"localhost"
--port number
--disableHostCheckfalse
--resources stringSet path to a folder served as static files under \resources
--scripts arraySet array of scripts to inject
--stylesheets arraySet array of stylesheets to inject
--enigma.host stringSet host name"localhost"
--enigma.port numberSet port name9076
--webIntegrationId string
--fixturePath stringSet path to a folder used as basis when locating fixtures"test/component"
-h, --helpShow help for command

Details

Using node.js API

const serve = require('@nebula.js/cli-serve');

serve({
  port: 3000,
  entry: path.resolve(__dirname, 'sn.js') // custom entrypoint
  enigma: {
    port: 9077
  }
}).then(s => {
  s.url; // serve url
  s.close(); // close the server
});

It can be used for automated tests.

Configuration file

nebula.config.js

module.exports = {
  serve: {
    ...,
  },
};

Serve properties

  • types: Additional types to load into the serve instance. Useful in conjunction with useEmbed.
    • ex: types: [{ name: 'barchart', url: "https://unpkg.com/@nebula.js/sn-bar-chart"}],
  • themes: Theme files to load.
    • ex: themes: [{ id: 'sense', theme: { /* valid sense json theme */ } }],
  • renderConfigs: Configuration for the test renderer.
  • flags: Additional flag settings for feature toggling.
    • flags: { SOME_FEATURE: true }
  • resources: Path to /resources
  • snapshots: Snapshots property structure, generally used for automated tests.
  • webIntegrationId: Run an extension against the Saas Edition of Qlik Sense.
    • webIntegrationId: 'your_web_intergration_id'
Select the themes

When themes are correctly set, you can select the themes at the top-right corner of the running app.

theme selection in current app
Run an extension against the Saas Edition of Qlik Sense

To learn how to get the webIntegrationId (qlik-web-integration-id) from here.

When you visit the URL to the nebula web development server, the engine URL should be pointed to your tenant: wss://tenant.us.qlik-stage.com.

Note: the URL to the nebula web development server, such as http://localhost:8000, should be added to the whitelist of origins.

Was this page helpful?