Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🗄🔧 Go + Gorilla mux #99

Closed
2 of 5 tasks
chilledoj opened this issue May 5, 2017 · 15 comments
Closed
2 of 5 tasks

🗄🔧 Go + Gorilla mux #99

chilledoj opened this issue May 5, 2017 · 15 comments
Labels

Comments

@chilledoj
Copy link

chilledoj commented May 5, 2017

Current Status

Todo:

  • 🏁 Fork the starter repo & post the link in this issue
  • 🎨 Create logo for repo & update issue status (@EricSimons)
  • 🔨 Implement all of Conduit's functionality per the spec & API
  • 👀 Move repo to main org & Peer review final codebase by admins/community (RFC)
  • 🎉 Tag v1 release and officially list it on the README!

Hi,

I have made a start on a fork utilising Go + Gorilla mux

Chilled OJ / realworld-starter-kit

@EricSimons EricSimons changed the title Go + Gorilla mux 🗄🔧 Go + Gorilla mux May 5, 2017
@EricSimons
Copy link
Member

@chilledoj awesome! Can't wait to see this 👍

@chilledoj
Copy link
Author

Hi @EricSimons, the api is now fully functional.

@EricSimons
Copy link
Member

@chilledoj awesome! I'm gonna test this out when I get home later today — have you tried running it against one of the supported frontends yet?

@chilledoj
Copy link
Author

I've only been testing against the Postman collections so far. Would appreciate someone else's view - maybe I missed something (error responses?). I've only been using the postman collections so far, but also studied the NodeJS code for a few things as I'm very familiar with NodeJS.

Let me know how you get on. This is my first stab at being part of open source code, and i'm a bit new to the git workflow.

I'll have a go at downloading a front end and testing it against it. I have a feeling I need to add CORS support - but luckily there is CORS available in the gorilla toolkit.

@EricSimons
Copy link
Member

@chilledoj yeah there's some nuances to the frontend/backend API that we're going to add to the spec ASAP (response codes, CORS, etc) — if you've been following the node codebase you should be good though!

No sweat btw, almost all of us are first timers to OSS here :) I've never used Go before so it's taking a while to get set up, but lmk if you get one of our frontends up & running and don't run into any errors!

@jamesbrewerdev
Copy link

Any update on this? Sounds like we're ready to mark this as complete, pending testing. Would love to close this issue out if we're good to go.

@chilledoj
Copy link
Author

I have tested the code against the postman collection and all tests pass - plus I have a few code tests written. I have struggled to test against a frontend. I'm not sure if anyone else has managed to download my code and test separately

@sluongng
Copy link

sluongng commented Jun 5, 2017

@chilledoj I appreciate your wiki very much. Im a newb at GO and reading about options and decision making really helped.

I have a question though:

  • Why shy away from usage of config files. May be config.json or config.yml and push out hardcoded configurations such as UsernameLengthRequirement ? What made github.com/namsral/flag a better choice than traditional config files?

@chilledoj
Copy link
Author

@sluongng i chose that package as it is a complete replacement for the standard flag package, but instead of just parsing command line options it will also check environment variables, and config files. In general my experience has been that things like http address/port and db urn are usually defined as environment variables in line with the idea of having a twelve factor app.
In terms of the username length requirement, that was personal preference, but also i see it as something bespoke to the models package. If I wanted to parameterise that item I'd need a way to pass in the value (and handle defaults) from the main package, by perhaps storing on the custom DB struct.

@chilledoj
Copy link
Author

@BRWR I have had confirmation on the Golang Gitter channel from @guillaumemaka that he has successfully tested with the react front end. I too have managed to test against this now.

@sluongng
Copy link

sluongng commented Jun 6, 2017

@chilledoj could you provide some sort of example template for config file? I agree with your point about Environment Variables but problems come when you try to communicate with a large group of people. Its better to have some documented guideline rather than forcing a Java/C# dev to read and understand GO code.

For example, something like:

//config.yml.example
host: 111.222.333.444
port: 8085

Would be very beneficial. Newcomers can just get the file from repo, edit and rename

@chilledoj
Copy link
Author

@sluongng The github.com/namsral/flag package determines the config file format. But I've updated the repo to contain a config file and included some more items for handling http(s).

@Dkairu
Copy link

Dkairu commented Apr 4, 2019

@chilledoj Any progress on this?

@chilledoj
Copy link
Author

@Dkairu It’s been a while since I looked at this repo. I’m pretty sure that it was working across the whole API spec.

@geromegrignon
Copy link
Contributor

Hello, we moved the addition of new implementations to this website : https://codebase.show/projects/realworld
Please submit your implementation there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants