DEV Community

JavaScript Joel
JavaScript Joel

Posted on

6

Looking for beta testers for express-easy-routes

Express Easy Routes sets up a happy medium Convention over Configuration approach to express routes.

Do you use express? Would you care to give express-easy-routes a spin?

If you are used to writing express routes this way 👇, you might find Express Easy Routes useful!

app.use(express.static()); // ❌ NO!

// ❌ NO!
app.get("/", (req, res) => {
  res.send("Hello World!");
});

Instead of configuring each route, tell express where to find your routes.

// âś… YES!
routes({ app, path: __dirname + "/middlewares/**/*.middleware.js" });
routes({ app, path: __dirname + "/controllers/**/*.controller.js" });

I have convinced Paciolan of the benefits of contributing to the open source community. I am hoping to turn this into a positive experience so they continue to give us devs the time and resources to make more contributions.

All feedback welcome! Want to contribute? Head over to the Github.

Continue to: npm github

Cheers!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (7)

Collapse
 
thehanna profile image
Brian Hanna •

I'm currently refactoring a bunch of Express projects and I'll definitely give this a try!

Collapse
 
joelnet profile image
JavaScript Joel •

Awesome. I can't wait to hear your feedback on this!

Collapse
 
thehanna profile image
Brian Hanna •

Finally got a chance to implement this in a project I'm working on! It's really straightforward. I especially like the ability to easily add global middleware. I'd love to be able to use it to wire up middleware in an individual controller, but it's cleaned up a lot of clutter already!

Thread Thread
 
joelnet profile image
JavaScript Joel •

Glad it is helpful!

Tell me more about what, why, how of wiring up middleware to one controller. If it can't be done currently, maybe a future feature can add this.

Cheers!

Collapse
 
debkanchan profile image
Debkanchan Samadder •

I never realized until now you could have an orgasm over code.

Collapse
 
joelnet profile image
JavaScript Joel •

LOL I guess that means you like this?

Collapse
 
debkanchan profile image
Debkanchan Samadder •

YES! VERY MUCH!