@json-express/core
Version:
Zero-config JSON server with REST API, JWT authentication, HTTPS support, schema validation & search. Perfect for rapid prototyping, API mocking, and development.
18 lines (14 loc) • 360 B
JavaScript
let configStore = {
port: 3000,
protocol: 'http',
'schema.validation': 'optional' // optional | strict
}
export const updateConfigStore = (store) => {
configStore = { ...configStore, ...store }
}
export const getConfig = (key) => {
return configStore[key]
}
export const upsertConfig = (key, config) => {
configStore[key] = config
}