UNPKG

@darwino/darwino

Version:

A set of Javascript classes and utilities

26 lines (25 loc) 796 B
/* * (c) Copyright Darwino Inc. 2014-2017. */ var DEV_OPTIONS = { DEVELOPMENT: false, WEBPACK: false, // Prefix to be added to the URL when using webpack // Note that the Darwino server must implement CORS, which is easily done using a filter serverPrefix: null, // In a prod app, the credentials should only be passed to the same origin // But for dev, we always include the credentials credentials: "same-origin" }; export default DEV_OPTIONS; export function initDevOptions(httpUrl, wsUrl) { DEV_OPTIONS.DEVELOPMENT = true; var devpack = window.location.port == 8008; if (devpack) { DEV_OPTIONS.WEBPACK = true; DEV_OPTIONS.serverPrefix = httpUrl; DEV_OPTIONS.wsPrefix = wsUrl; DEV_OPTIONS.credentials = "include"; } } //# sourceMappingURL=dev.js.map