const BASE_URL = function () {
|
|
switch (process.env.FLYLOCAL_ENV) {
|
|
case "prod":
|
|
return process.env.PROD_URL;
|
|
case "dev":
|
|
return process.env.DEV_URL;
|
|
case "local":
|
|
return "http://" + process.env.LOCAL_IP + ":" + process.env.LOCAL_PORT;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
export default ({ app }, inject) => {
|
|
// Inject $hello(msg) in Vue, context and store.
|
|
inject('BASE_URL', () => BASE_URL())
|
|
inject('hello', msg => console.log(`Hello ${msg}!`))
|
|
}
|