A method for get a determinate key from your config.json file.
config.json
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];
There was an error while loading. Please reload this page.
Feel free to offer new features, improvements or anything you can think of. This project makes sense with your participation and experience using Ava.