Skip to content
This repository has been archived by the owner on Feb 17, 2019. It is now read-only.

alpjs/alp-config

Repository files navigation

alp-config

config in alp framework

In your app

import packageConfig from './package.json';
import { Config } from 'alp-config';

const config = new Config(__dirname + '/config');
export default config;
config.loadSync({ packageConfig });

With Koa

import Koa from 'koa';
import config from './config';

const app = new Koa();
config()(app, config);

With Ibex

Config is cached in localstorage. /config is the path to the public config folder.

import Ibex from 'ibex';
import config from './config';

const app = new Ibex();
app.appVersion = '1.0.0';
config('/config')(app);

With Alp

import Alp from 'alp'; 
import config from './config';

const app = new Alp({ config });