#I'm a NodeJs dev trying to learn Go for web development and need help.
35 messages ยท Page 1 of 1 (latest)
Go CHI looks pretty simple, but when I open a github repo like this one:
https://github.com/dhax/go-base
90% of the stuff here is alien to me. No idea why it's there and if my server should have it.
You could start with a simple REST api using https://echo.labstack.com/.
I'd ignore most of that repo you linked until you know you need something ๐
Yeah, I will try to go slow and steady on learning it instead of rushing so I can start my new project in Go
you don't need a framework at all
specially when learning
have a look at https://go.dev/doc/articles/wiki/ ?
I understand that, go chi seems simple enough, I like how it works.
not far from the vanilla stuff
if you like chi there is https://github.com/madxmike/zenith-bookshop
I'd still do without anything in the context of "trying to learn Go" but...
But I feel like there are a lot of unwritten rules, like how you meant to struct your directories (I've read the faq). In ExpressJs or Fastify, I would just create a main routing place, and one folder for each entity. In e.x.:
src|
|-entities|
| |-user
| |-events
| |-meals
|-authorization
etc
I'm sorry I think my English is not very good. I don't understand this
go is even simpler, no ./src
english is also not my first language ๐ I'm trying to say that when learning it's useful to use only what the language provides, after which you can see if you really need some additional libraries
Got you, it makes sense. I'm a bit stubborn to accept this advice because I want to learn as fast as possible, but I will give it a try
(like, I tend to jump into the most common industry standard in hopes to accelerate the process)
Is this like a boilerplate/example for a chi backend?
btw we are on a thread so... I already get notifications you replied
Is this like a boilerplate/example for a chi backend?
yes made by @granite fractal
if you use it just drop the useless ./cmd/ or at least not call it "api" :-p
Ok, I will stop using the answer functionality to reference the message ๐
it's useful in flat channels like #go-chat but much less in this format specially if only 2 people are talking (at the moment)
that makes sense
Ok, these both repos are gonna be really useful on my journey
I have a contract to develop a new api starting on Friday, from my company, I was hoping to learn go until then and just use it from the beginning. I will do it in Node and refactor it once I feel confident enough
(I just said as a side note, this is not important)
I guess I was hoping too high lol
Just one question on this repo
https://github.com/madxmike/zenith-bookshop/blob/main/listing/listing.go
Listing is being used on the files and directories names as an entity, but also as a directory structure pattern?
The chi part of it is mostly irrelevant
If I cared more I would replace it with net http
It looks like both are almost the same, and the only different that I noticed is that chi has cooler names
This repo is bonkers, thank you three
I have a contract to develop a new api starting on Friday
well that's a bit more pressing than learning for fun, so yeah it may make sense to use some libraries then