Golang/Quiz app

I need to run a project that I’ve found on github but I’m having really hard time doing it so.I would really appreciate any help.Thank you!

what problems do you have?

BTW the app doesn’t seem to be well written. Global variables, a lot of repeated code isn’t a good sign of high quality code.

Hi I’ very new/bad about golang.I don’t know how to run a golang program with a UI.I just wrote some basic code and run it in terminal but I’ve never done it with a UI.

what you need to do is to get the IP/host of the running API. It can be localhost:8080 on your local machine and use it in your react app.

Thank you so much for the answer.Could you be more spesific on how to implement the ip to react app of the project?

I think you’re trying to learn too much at once.

Here, you start an HTTP server https://github.com/ananyaarun/React-and-Go-quiz-app/blob/master/go/src/main.go#L156 on localhost: 8080. To make a call from react app to your endpoint, for example, http://localhost:8080/question1 and use fetch() method to fetch those data https://reactjs.org/docs/faq-ajax.html.

But what I suggest is just learning one thing at once. Maybe start with consuming already working API like http://dummy.restapiexample.com/, play with it and then start writing your own :slight_smile: