You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
529 B

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}!`))
}