UNPKG

@json-express/core

Version:

A simple json server which serves all json files

17 lines (13 loc) 337 B
let configStore = { port: 3000, 'schema.validation': 'optional' // optional | strict } export const updateCofigStore = (store) => { configStore = { ...configStore, ...store } } export const getConfig = (key) => { return configStore[key] } export const upsertConfig = (key, config) => { configStore[key] = config }