Skip to content

Repository files navigation

Mozaïk demo dashboards

Travis CI

This repository shows how to use Mozaïk with npm extensions.

Usage

Clone the repo

git clone git@github.com:plouc/mozaik-demo.git

Install packages

cd mozaik-demo
yarn install

Build assets (js/css)

yarn build

Run the default demo

node server.js

Running an alternative demo

This repo provides several config files targeting specific extensions demo, to run another demo, simply pass the config file as first argument:

node server.js config-github.yml

Just search for config-*.yml files to see what's available.

Tweaking default theme

Several themes are loaded from mozaik-themes package, you can change the default theme used by updating this line in src/index.js:

// src/index.js
ThemeManager.defaultTheme = wine.name

Adding environment variables

Some extensions requires additional settings, you can add it via environment variables to avoid modifying config files, you can use export:

export GITHUB_API_TOKEN="xxxxx"
node server.js config-github.yml

or prepend it to the command:

GITHUB_API_TOKEN="xxxxx" node server.js config-github.yml

or create an .env file if you want a more permanent solution:

# .env
GITHUB_API_TOKEN=xxxxx
node server.js config-github.yml

Note that .env file is in .gitignore to prevent pushing sensible data to GitHub.

About

experimental stats repo using an unreleased mosaik v2 branch

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages