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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃梽馃敡 Go + Gorilla mux #99

Open
chilledoj opened this issue May 5, 2017 · 14 comments
Open

馃梽馃敡 Go + Gorilla mux #99

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

Comments

@chilledoj
Copy link

@chilledoj 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

@EricSimons EricSimons commented May 5, 2017

@chilledoj awesome! Can't wait to see this 馃憤

@chilledoj
Copy link
Author

@chilledoj chilledoj commented May 21, 2017

Hi @EricSimons, the api is now fully functional.

@EricSimons
Copy link
Member

@EricSimons EricSimons commented May 21, 2017

@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

@chilledoj chilledoj commented May 21, 2017

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

@EricSimons EricSimons commented May 22, 2017

@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!

@dinosaursflyingspaceships
Copy link
Collaborator

@dinosaursflyingspaceships dinosaursflyingspaceships commented May 31, 2017

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

@chilledoj chilledoj commented Jun 2, 2017

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 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

@chilledoj chilledoj commented Jun 5, 2017

@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

@chilledoj chilledoj commented Jun 5, 2017

@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 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

@chilledoj chilledoj commented Jun 6, 2017

@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 Dkairu commented Apr 4, 2019

@chilledoj Any progress on this?

@chilledoj
Copy link
Author

@chilledoj chilledoj commented Apr 13, 2019

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

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can鈥檛 perform that action at this time.