Coder Social home page Coder Social logo

olivierh59500 / slack-hn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karan/slack-hn

0.0 1.0 0.0 136 KB

SEE https://github.com/karan/slack-news INSTEAD

Home Page: https://github.com/karan/slack-news

License: MIT License

JavaScript 100.00%

slack-hn's Introduction

SEE https://github.com/karan/slack-news INSTEAD

slack-hn

Read Hacker News right from Slack just typing /hn.

Usage

From any Slack channel, just type /hn. The posts will be shown on the same channel.

Installation

  • Go to your channel
  • Click on Configure Integrations.
  • Scroll all the way down to DIY Integrations & Customizations section.

Add a new slash command with the following settings:

  • Click on Add next to Slash Commands.

    • Command: /hn
    • URL: http://slack-hn.herokuapp.com/hn
    • Method: GET

All other settings can be set on your own discretion.

Set up a new incoming webhook

  • Click on Add next to Incoming WebHooks.

    • Choose a channel to integrate with (this doesn't matter -- it'll always respond to the channel you called it from)
    • Note the new Webhook URL.

  • Set a new environment variable called SLACK_WEBHOOK_URL.

    # Unux systems (AWS etc)
    $ export SLACK_WEBHOOK_URL=<URL>
    
    # Heroku
    $ heroku config:set SLACK_WEBHOOK_URL=<URL>

(Optional) Setup your own server

Although the code is hosted at http://slack-hn.herokuapp.com/, you are free to setup your own instance.

Make sure to change the Slash Command URL to whatever your URL is.

Heroku

Deploy

And then:

$ heroku config:set SLACK_WEBHOOK_URL=<URL>
Other servers
$ git clone [email protected]:karan/slack-hn.git
$ cd slack-hn
$ npm install
$ export SLACK_WEBHOOK_URL=<URL>
$ node app.js

Contributing

  • Please use the issue tracker to report any bugs or file feature requests.

  • PRs are welcome.

slack-hn's People

Watchers

 avatar

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.