provide config for codegen
This commit is contained in:
parent
344d1a8d0a
commit
1a9088e3e9
|
@ -0,0 +1,11 @@
|
|||
import * as default_config from './public/config.json'
|
||||
|
||||
export let config = default_config /** to infer the types **/
|
||||
let config_fetched = false
|
||||
|
||||
export async function fetch_config () {
|
||||
if(!config_fetched) {
|
||||
await fetch("/config.json").then(async res => {config = await res.json()
|
||||
config_fetched = true})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
{"base_url": "http://localhost:3000",
|
||||
"backend_base_url": "http://localhost:4000"}
|
Loading…
Reference in New Issue