question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extract express out of hubot core

See original GitHub issue

The main problem with hubot’s express support, from a user’s perspective, is that it doesn’t allow a lot of customizability. Sure, you can add routes to it easily enough, but if you need to add or swap middleware, it’s less obvious how to do that in a clean way.

A problem from a hubot maintenance point of view is that it’s a part of hubot’s core that people want to change, so any changes to it have to be carefully considered before merging or it could impact existing users.

So the general thinking has been to remove robot.router from hubot-core, and move it to its own package. The main obstacle to doing that is… if express support is external to core, how would scripts go about adding their own routes, middleware, etc, without clobbering others? In addition, there’s not a clear path for something like this being an extension to hubot, rather than a package of scripts.

Most recent discussion over in https://github.com/github/hubot/pull/764

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
technicalpicklescommented, May 23, 2017

I have been thinking about this a bit, and I don’t think we can quite remove express, as it will be useful when building adapters that use webhooks.

The main motivation for me to want to remove express was that there have been many requests over the year to adjust how the builtin express app works, and that usually involves exposing environment variables to turn things on or off. There are an infinite number of combinations though, so it doesn’t really scale.

Instead of removing, maybe we could do something similar to botkit, which has a default way to setup express, or you can pass in your own instance of express. I think that would give users a lot more flexibility, while offering express as something out of the box.

I think the main blocker to doing that is https://github.com/github/hubot/issues/858

0reactions
stale[bot]commented, Nov 21, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow programmatic launching of hubot · Issue #858 - GitHub
As I understand it, the long-term goal is to pull Express out of the core. I would be okay assuming #767 is a...
Read more >
Automation and Monitoring with Hubot
Hubot needs a “brain” to store the data, and it needs. Redis to work out of the box. apt-get install redis-server. Make sure...
Read more >
Basic HTTP authentication with Node and Express 4
To correctly extract it from the b64auth, you can use this. // parse login and password from headers const b64auth = (req.headers.authorization ||...
Read more >
Curl JSON Query - The Orion Platform - SolarWinds THWACK
What I am trying to get is every interface known by NPM, it's Name , it's Description (Alias) and it's Out/In bps counters...
Read more >
Community tools for Slack apps
NET core package for working with OAuth, Events API, Web API, and interactivity. ... easy, and fun; mmbot - a C# port of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found