78
GitHub - GoogleChromeLabs/go-hackernews: A Hacker News client written in Go
source link: https://github.com/GoogleChromeLabs/go-hackernews
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
A Hacker News client written in Go
What is this?
A Hacker News client (yes, another one) written in Go using GopherJS.
What is this built with?
- GopherJS to compile Go to JavaScript
- myitcv.io/react for React bindings
- JSX is supported, but this app does not have any :)
- Humble/Router for routing
Additional
Setup
- Fork/clone the repo
- Install packages:
go get -u github.com/gopherjs/gopherjs go get -u myitcv.io/react myitcv.io/react/cmd/reactGen go get -u honnef.co/go/js/xhr github.com/go-humble/router
- Add GopherJS and ReactGen to PATH:
export PATH="$(dirname $(go list -f '{{.Target}}' myitcv.io/react/cmd/reactGen)):$PATH"
- Install dependencies (for the service worker):
npm install
- Create generated files for each component:
go generate
- Build the application:
npm run build
This will save create script.min.js
and service-worker.js
in the build/
folder. You can use any local testing server in build/
to boot up the application (for example: python -m SimpleHTTPServer
if you have Python installed).
Can I contribute?
Of course you can! Please take a look at the contributing documentation for more info.
License
Apache 2.0
This is not an official Google product.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK