maxence-charriere / go-app

A package to build progressive web apps with Go programming language and WebAssembly.
https://go-app.dev
MIT License
7.91k stars 363 forks source link

How do i make this work on windows #737

Closed ObiajuluM closed 2 years ago

ObiajuluM commented 2 years ago

I have done everything in the tutorial so far, I have successfully generated the 6 files, how do I run the server the tutorial says to run this ./hello in the terminal, but it doesn't work. it seems like a Linux command

thanks

oderwat commented 2 years ago

The filename after building the project on windows will end in .exe. It depends on the folder your code resides in when running the go mod init or on the name you have chosen when using go mod init withsome.com/yourname/hello.

You can also force the name using the following two lines to build the app:

GOARCH=wasm GOOS=js go build -o web/app.wasm
go build -o hello.exe

P.S.: Actually, it sounds as if you are a Go beginner and you could look up some info about building programs with Go using Windows.

ObiajuluM commented 2 years ago

thanks :)

ObiajuluM commented 2 years ago

hello @oderwat, sorry to disturb you.

image

I have done the necessary but I get this error when I run the main.go file.

image
oderwat commented 2 years ago

The main does not end in .exe which happens if the Go environment thinks it is on Linux. Check with go env what GOOS says. I guess it will be "linux" or "darwin" but it must be "windows".

Check this: https://github.com/golang/go/issues/40237 (not the first answer, which is about virus checkers but the later one)

ObiajuluM commented 2 years ago

done, it works thanks

ObiajuluM commented 2 years ago

Can you recommend any tutorials for Go-app other than the website-provided one? Videos, blogposts, anything

oderwat commented 2 years ago

Can you recommend any tutorials for Go-app other than the website-provided one? Videos, blogposts, anything

I am not aware of anything like that. I also think that people have different approaches to using it. The only resources I know of are the few public projects that use go-app. We work on a pretty big (and very opinionated) framework that sits on top of (a fork) of Go-App. But that will probably never be (fully) released to the public. We may create some examples in the future. I plan to let some developers create demos with the raw Go-App that can be published when starting to work with our framework.

ObiajuluM commented 2 years ago

Sorry to disturb, Do you know any other frameworks similar to this, for building PWAs and in full go code?

oderwat commented 2 years ago

There are vugu, vecty and maybe dashborg-go-sdk are what I know of. I don't comment them :)

ObiajuluM commented 2 years ago

Thanks

ObiajuluM commented 2 years ago

We work on a pretty big (and very opinionated) framework that sits on top of (a fork) of Go-App. But that will probably never be (fully) released to the public.

what framework is that?

oderwat commented 2 years ago

what framework is that?

Our own of course.

ObiajuluM commented 2 years ago

It's private?

oderwat commented 2 years ago

Yes

ObiajuluM commented 2 years ago

Ok, enjoy