// for development, to use api-stub, just import it here and export it at the end; // it's a one-liner that switches from stub to actual api const api = {}; // not `/api` (relative to domain root) nor `//api` (results in https:///api/...) let prefix = "api"; api.post = function(url, body){ return m.request({ method: 'POST', url: prefix+url, body }); }; export default api;