Skip to content

alextanhongpin/rss-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSS Insight

RSS Feed built with JavaScript.

Server side is powered by koa, primus and feedparser.

Client side is powered by jQuery, moment, rx.js.

View the working example here. Designed by alextanhongpin.

Sample Screenshot

Websocket endpoint:

const primus = new Primus('ws://rss-service.herokuapp.com/')

Request:

primus.write({
    action: 'server:publish', 
    payload: {
        // Array of rss links
        urls: ['']
    }
})

Response:

primus.on('data', (data) => {
    const rss = data.payload
    const error = data.error
    const action = data.action

    if (error) handleError(error)
    if (action === 'client:subscribe') {
        if (rss) {
            const title = rss.title
            const summary = rss.summary
            const image = rss.image.url
            const link = rss.link
            const pubdate = rss.pubdate
        }
    }
})

Releases

No releases published

Packages

No packages published