Adding request works (mostly)

Everything works except adding the new request back to the list; this
proof of concept is a go, and will be merged to master
This commit is contained in:
Daniel J. Summers
2017-09-21 18:45:06 -05:00
parent 794a365f08
commit 015645aa86
14 changed files with 179 additions and 55 deletions

12
src/api/json.mjs Normal file
View File

@@ -0,0 +1,12 @@
'use strict'
import fs from 'fs'
/**
* Read and parse a JSON file
* @param {string} path The path to the file
* @param {string} encoding The encoding of the file (defaults to UTF-8)
* @return {*} The parsed contents of the file
*/
export default (path, encoding = 'utf-8') =>
JSON.parse(fs.readFileSync(path, encoding))