Skip to content

a restful hacker news story api using go & gin framework

License

Notifications You must be signed in to change notification settings

aacanakin/hn-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a restful hacker news story api using go & gin framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published