Hacker News for Gophers

I’m the owner of golangnews.com , I was having the same purpose of this but got no time. I can resolve domain to your server if you want.

2 Likes

That would be awesome, thank you for the kind offer @Unknwon

I’m getting “Welcome to nginx on Debian” when I visit the link.

Thanks to @Unknown for redirecting his domain http://golangnews.com , which is excellent - DNS might take a while to propagate. He is now officially 1337 - http://golangnews.com/users/20

@mindscratch not sure why you’d see that, I see the right thing on both domains now.

I’ve put up a little summary of the rules governing voting, in case anyone is interested, we should probably take things over there for now if anyone has further comments, to stop hogging the golang forum home page:

http://gohacker.news/stories/72

I’ll look at RSS sometime and a few other features (please do suggest any you want on the link above), and plan to continue looking for content and posting stories, hopefully joined by a few other people as yesterday - registration is friction-free and email-less, so please feel free to post any golang related links (as well as posting them here on the forum for a better discussion).

Thanks again to the forum people for a place to discuss things like this, and to those providing feedback above. Finally, here is a farewell pic of the site on mobile.

1 Like

Not sure, but it’s loading now.

Nice job :slight_smile: Go community is even better than Rails at the best of its days :slight_smile:

Is there a way to tell if there are comments? Looking at the first page all the threads have the comment icon, but when I click into random threads it says “register to comment”. Does this just mean there are no comments yet?

For Ask: and Show: links it might be nice to have it go to the comments page instead of an external website.

Hi Katrina,

thanks for having a look, the comments bubble shows where there are no comments yet or a number where there are comments on that story. If you look at the ask section for example you’ll see a few comments.

The site was only announced a few days ago and at 20 registered users, so there are more links being posted than comments right now, esp. on home. If you look on some of the subsections you’ll see more comments. Hopefully that will improve with time as more people discover it.

Thanks for trying it Matt. I agree an Ask story should perhaps go to the comments by default. It does that when there is no url on the story, but I did want to give the option of providing a link to the thing you’re asking about/showing, so that readers can visit it. Perhaps on Ask and Show they could take you through to the story with comments for discussion, which then has a prominent link to the url.

Yeah, it also looks a little weird for me on Chrome…

That looks like the default site for nginx, as if the SNI isn’t working with your browser, I don’t have a default site set and could do so which will probably fix this, but am now curious. I have nginx proxying in front of the go process to serve static files, and it is not recognising the domain (or not receiving it), so it’s serving the default site here I think. Does the .com domain look the same to you? What happens if you turn off all chrome extensions you have loaded?

what’s the dot com address? I tried gohacker.com and gohackernews.com. neither seem to be a thing

The two addresses are http://gohacker.news, and http://golangnews.com. I should really redirect one to the other at some point. I’m curious now to see what is causing this (your location, browser, extensions, or some bad config on my end) - anyone else have any ideas?

Pretty sure I can fix it by setting up the default domain to serve the site, but would like to know why it happens.

I get the default welcome page on http://gohacker.news – what is your nginx config?

Also consider using Caddy :stuck_out_tongue_winking_eye:

1 Like

most likely an issue with your nginx config. (Possible the server_name directive is set to golangnews.com, which is why that works, but gohacker.news doesn’t?

Seriously considering it :slight_smile: I haven’t tried it out yet but might try it out for this website.

The problem will be with my config then. I’ve just had a look, the default config is still in place (I should probably remove that, but still, in theory it is overridden by a specific domain, and works for me here).

Default config from nginx installation:

server {
	listen 80 default_server;
	listen [::]:80 default_server;
	root /usr/share/nginx/html;
	index index.html index.htm;
}

Domain specific config is:

upstream fragmentabackend {
server localhost:4000 weight=5;
}

# redirect www to base domain
server {
listen 80;
server_name www.gohacker.news www.golangnews.com;
rewrite        ^ http://gohacker.news$request_uri? permanent;
}


server {
listen      80;
server_name gohacker.news golangnews.com;

...


# serve static files first if they exist, otherwise had over to go
location / {
try_files   $uri @proxy;
}

location @proxy {
 proxy_pass http://fragmentabackend;
 proxy_set_header Host $host;
 proxy_set_header  X-Real-IP  $remote_addr;
}

}

I can see the site fine, which is a little strange, however looking at the default site which is still in place I did notice it is set up to serve listen [::]:80 default_server; as well as listen 80, so I guess it could be that my config isn’t listening for IPV6 requests but the default one is? I might try that. Any comments on crazyness in my config welcome…

I’ve done a couple of things:

Disabled default config
Changed my config to listen [::]:80 default_server; as well as listen 80

so that might fix it, let me know if you still see a problem.

I cleared my browser cache (did a hard refresh) and it worked.

OK, might just be that I just changed config just now, see above.