siberiacancode / mock-config-server

🎉 tool that easily and quickly imitates server operation, create full fake api in few steps
https://www.npmjs.com/package/mock-config-server
MIT License
91 stars 4 forks source link

Flat config #187

Open debabin opened 3 weeks ago

debabin commented 3 weeks ago

Create new functions to launch the following config

export type FlatMockServerConfig = {
  configs?: Array<RestRequestConfig | GraphQLRequestConfig>;
  baseUrl?: BaseUrl;
  interceptors?: Interceptors;
  database?: DatabaseConfig;
};

export type FlatMockServerSettings = {
  baseUrl?: BaseUrl;
  port?: Port;
  staticPath?: StaticPath;
  interceptors?: Interceptors;
  cors?: Cors;
};

const startFlatConfig = (first: FlatMockServerConfig  | FlatMockServerSettings , ...configs: FlatMockServerConfig[])