hn-go

command module
v0.0.0-...-1485983 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2016 License: MIT Imports: 12 Imported by: 0

README

hn-go

hn-go is a restful hacker news api & story data consolidator using gin framework

Installation

  1. Install the package
go get -v -u github.com/aacanakin/hn-go
  1. Install httpie // for cronjobs
sudo apt-get install httpie
  1. Install mongodb

  2. Install memcache

  3. Make the configuration

In the config.toml file, there exists various configuration options. Just change them according to your configuration.

  1. Run the server
go run app.go
  1. Run the jobs // schedule these jobs in crontab
sh crons.sh

Routes

- GET /stories/:type
    Description: Returns the stories in json format of github.com/aacanakin/hn

- PUT /stories/:type
    Description: Retrieves the stories and saves it to db

Type could be the following;
    - new
    - top 
    - job
    - ask
    - show

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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