x

command module
v0.0.0-...-5b391e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2020 License: GPL-3.0 Imports: 28 Imported by: 0

README

x

This project is powering a site called https://8hrs.xyz which keeps all frontpage articles from hacker news for 8 hours.

Use latest go with modules to build this project.

build.sh builds with version as the latest git commit hash.

sqlitedb is needed. create a database file before running the app.

configuration that is required to run the executable are passed as env vars and listed in x.service.

modify the config.json as required.

there is one http endpoint.

. / serves the index html or json based on reqquested content-type . /feed/{rss|atom|json} responds with rss or atom or json feed

(order of list items is randomized between requests)

http rate limiting middleware is used to limit requests to 5 per minute.

this whole flow of the app depends on the hacker news apis.

Documentation

Overview

This application keeps any article from any source that implements app.Bringer interface for eight hours even after they left the homepage or from top content. Currently works with hacker news (http://news.ycombinator.com/)

Directories

Path Synopsis
Package app provides models that are needed by x.
Package app provides models that are needed by x.
Package bringer will have multiple feed bringers from different sources.
Package bringer will have multiple feed bringers from different sources.
Package dbp provides access to storage and querying.
Package dbp provides access to storage and querying.
Package encrypt provides encryption and decryption functions.
Package encrypt provides encryption and decryption functions.
Package hn provides functions to fetch data from hacker news.
Package hn provides functions to fetch data from hacker news.
Package maintainer deals with all the bringers.
Package maintainer deals with all the bringers.
Package server provides http handlers and middlewares.
Package server provides http handlers and middlewares.
Package util provides utitlity functions.
Package util provides utitlity functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL