-
Notifications
You must be signed in to change notification settings - Fork 21
Helper.config()
Javi Jiménez edited this page Jun 26, 2016
·
4 revisions
A method for get a determinate key from your config.json
file.
import { config } from 'ava-ia/lib/helpers';
const credentials = config('themoviedb');
console.log(credentials);
// { "url": "https://api.themoviedb.org/", "apikey": "{your_api_key}" }
'use strict';
const file = require(process.cwd() + `/config.json`);
export default (key) => file[key];
Feel free to offer new features, improvements or anything you can think of. This project makes sense with your participation and experience using Ava.