GithubHelp home page GithubHelp logo

danesparza / twitter-breaking-news Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 1.0 19 KB

:squirrel: Simple breaking news microservice written in Go

License: MIT License

Go 100.00%
twitter dashboard go json news-feed

twitter-breaking-news's Introduction

twitter-breaking-news Circle CI

Simple breaking news microservice written in Go

Quick Start

Grab the latest release for your platform

or

docker pull danesparza/twitter-breaking-news:latest

See the dockerfile for the environment variables you'll want to use to pass information to the service

Starting the service

To start the service, just run twitter-breaking-news.

If you need help, just run twitter-breaking-news --help.

There are a few command line parameters available:

Parameter Description
port The port the service listens on.
allowedOrigins comma seperated list of CORS origins to allow. In order to access the service directly from a javascript application, you'll need to specify the origin you'll be running the javascript site on. For example: http://www.myjavascriptapplication.com
consumerKey The consumer key (API key). Get this from your Twitter app dashboard.
consumerSecret The consumer secret (API secret). Get this from your Twitter app dashboard.
authToken The auth token (Access Token). Get this from your Twitter app dashboard.
authSecret The auth secret (Access Token Secret). Get this from your Twitter app dashboard.

Testing the service

Once the service is up and running, you can connect to it using http://yourhostname:3000/news/screenname where screenname is the twitter screen name you're using to get breaking news.

Example: http://yourdomain.com:3000/news/cnnbrk

To test your service quickly, you can use the Postman Google Chrome Extension to call the service and see the JSON return format.

News information will be returned as a JSON payload.

Building from source

To build, make sure you have the latest version of Go installed. If you've never used Go before, it's a quick install and there are installers for multiple platforms, including Windows, Linux and OSX.

go get github.com/danesparza/twitter-breaking-news
go build

twitter-breaking-news's People

Contributors

danesparza avatar

Stargazers

 avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

Forkers

fosron

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.