UNPKG

@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.

16 lines (12 loc) 335 B
import { getConfig } from '../db/config-store.js' import server from './server.js' import secureServer from './secure-server.js' const createServer = () => { const protocol = getConfig('protocol') if (protocol === 'https') { return secureServer } else { return server } } export default createServer