This repository shows how to use Mozaïk with npm extensions.
git clone [email protected]:plouc/mozaik-demo.git
cd mozaik-demo
git checkout mozaik-2
yarn install
yarn build
node server.js
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 conf/config-github.yml
See conf/
directory for available config files.
Several themes are loaded from
@mozaik/themes
package, you can change the default theme used by
updating this line in src/register_themes.js
:
// src/register_themes.js
// …
ThemeManager.defaultTheme = wineTheme.name
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
(you have a sample file available .env.sample
):
# .env
GITHUB_API_TOKEN=xxxxx
Note that .env
file is in .gitignore
to prevent pushing
sensible data to GitHub.