Introducing console-to-slack: Slack webhooks for the JavaScript console

Introducing console-to-slack: Slack webhooks for the JavaScript console

We are very excited to announce console-to-slack, our first package of the year! One of our main goals for 2017 is to contribute more to the open-source community, so it is a good first step to be contributing this early in the new year. As an organization that has invested a lot into the open-source movement, we are excited for its future and how we can play our part.

So, what exactly is console-to-slack and how do we use it here at TechChange? Console-to-slack is a small module that utilizes Slack’s webhooks to send anything that normally is printed to the console to a Slack channel of your choice.

We recently made a push to update our authentication processes to use JSON Web Tokens (JWTs) to more align with a trusted, industry standard for authentication. As we were working on this update, we needed a way to debug our changes in real-time without having to constantly monitor our application logs. In the past, we had tried out a module which would email us with any errors, but a few thousand emails and about 30 seconds later, we decided that wasn’t the best idea.

As an organization, TechChange uses Slack for our team messaging and we take advantage of Slack webhooks to post messages to a Slack thread anytime we update one of our courses. We quickly put two and two together and about 100 lines of code later, we had a module which would post any application errors to a Slack thread, complete with an embarrassing, childhood photo of our CTO.

Our initial use case was debugging the rollout of JWTs into the world, but we soon discovered its perfect use for low-risk error monitoring and reporting. Since then, we have packaged console-to-slack as a npm module, added a few more features, and beefed up the documentation.

Despite being such a small module, console-to-slack has had a large impact on our code base and best practices as a tech team. We decided to be more intentional with our use of logging in order to filter out unnecessary messages. As a result, we discovered subtle mistakes in other sections of code that were unintended behavior.As a developer, it is a great feeling to contribute to the open-source community and we hope that TechChange’s contributions can help fellow developers as they see fit. We highly recommend that you dig up an embarrassing photo of your CTO, should you decide to give console-to-slack a try. Stay on the lookout for more open-source contributions from TechChange throughout 2017 and enjoy!

Josh Antonson | March 7, 2017  


要查看或添加评论,请登录

Nick Martin的更多文章

  • NickatNoon Newsletter #31 Teaser

    NickatNoon Newsletter #31 Teaser

    Hello Friends ?? Are you ready for something exciting this Friday? ?? In case you haven't heard, I've been working on…

    1 条评论
  • Come Find Me on SubStack...

    Come Find Me on SubStack...

    Hello Friends ?? In case you missed it, I've been writing a weekly newsletter over on SubStack full of the hottest…

    12 条评论
  • June Newsletter

    June Newsletter

    FROM MY DESK… Hello friends, welcome to my third monthly newsletter! I’m excited to share with you another format for…

    22 条评论
  • Notes from Nick #2

    Notes from Nick #2

    FROM MY DESK… Hello friends, welcome to my second monthly newsletter! As a reminder, each month I plan to curate…

    24 条评论
  • Notes from Nick!

    Notes from Nick!

    Hello friends, Welcome to my first monthly newsletter - Notes from Nick. I’m excited to share with you another format…

    83 条评论
  • 7 Tips for Getting a Job at the World Bank

    7 Tips for Getting a Job at the World Bank

    I asked over 20 colleagues who are working or have worked at the World Bank for their advice on how to get a job at the…

    33 条评论
  • 5 Research-Based Strategies for Better Teaching Online

    5 Research-Based Strategies for Better Teaching Online

    Written by Christopher Neu, COO TechChange Nearly two decades of data data-driven schooling demonstrate that better…

    5 条评论
  • Three (Downloadable!) Activities to Deepen Engagement for Digital Development

    Three (Downloadable!) Activities to Deepen Engagement for Digital Development

    All activities mentioned below are available for download! Please send any feedback to [email protected].

    2 条评论
  • TechChange Engagement With Notre Dame: Blended Learning for Technology and Global Health Education

    TechChange Engagement With Notre Dame: Blended Learning for Technology and Global Health Education

    TechChange has enjoyed working with the Notre Dame Global Health Institute for several years. We’re excited to have…

    1 条评论
  • Apply Now to Break Into Blockchain for International Development

    Apply Now to Break Into Blockchain for International Development

    Blockchain technology may have the potential to help us tackle existing development challenges and prepare governments…

    1 条评论

社区洞察

其他会员也浏览了