Replies: 2 comments 4 replies
-
I'm not sure I understand the context: How are you running this application? Are you using |
Beta Was this translation helpful? Give feedback.
-
That's the ticket! I added the following build script to set the environment variable according to the build profile and now I can read the value in code with fn main() {
match std::env::var("PROFILE") {
Ok(profile) => match profile.as_str() {
"debug" => println!("cargo::rustc-env=API_URL=http://localhost:5050/api/"),
_ => println!("cargo::rustc-env=API_URL=http://localhost/api/"),
}
_ => panic!("Environment variable PROFILE not set"),
}
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to call a server-side function from a Letpos csr app. Here's a simplified example of what I tried.
This isn't working because the server is rejecting the POST request.
Is there something I should be doing to allow POSTs?
For what it's worth, here's the request.
Beta Was this translation helpful? Give feedback.
All reactions