Replies: 2 comments 2 replies
-
Wails wasn't initially designed for this use case but it is something more and more people are asking for so we are looking into it. To be honest, it's not my area of expertise so the more we have in that discussion the better. Is that something you're willing to contribute to? |
Beta Was this translation helpful? Give feedback.
2 replies
-
You could have a logic based on the environment variables: window.make_request("store/create_item", json_data) {
if (env.spa) {
// call http
} else {
// call wails
}
} Please note, this is just some not working example. You must find that way by yourself. app.go // Request model
type RequestModel struct {
Route string
Body string
}
// Response model
type ResponseModel struct {
Response string
Error string // Validation error
}
// Request from the frontend
func (a *App) Request(data RequestModel) (*ResponseModel, error /* System error */) {
return &ResponseModel{ Response: "ABC" }, nil
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know that the
wails dev
host a web version for development purpose only, but, is there a way to have that web version hosted on a production environment?I must be missing something here, but from what I've seen if I build my application around Wails, and want to deploy it to the cloud, I'll lose the ability to talk with my Wails backend, therefore I will have to change all those calls, there's a way to build a Single Page Application based on my Wails application similar to what we already have in Ionic?
Beta Was this translation helpful? Give feedback.
All reactions