F45FW / generator-fwsp-hydra

Yeoman generator for Hydra services
MIT License
8 stars 5 forks source link

Remove Newline format for routes? #17

Closed cjus closed 7 years ago

cjus commented 7 years ago

In the generated {service}-v1.route.js file the (req, res) appears on a new line.

api.get('/', hydraExpress.validateJwtToken(),
(req, res) => {
  res.sendOk({greeting: 'Welcome to Hydra Express!'});
});

Can you change it to:

api.get('/', hydraExpress.validateJwtToken(), (req, res) => {
  res.sendOk({greeting: 'Welcome to Hydra Express!'});
});

I think I prefer the format above. But if you're attached to it let's discuss ;-)

emadum commented 7 years ago

I like having it on a new line, particularly when there's a lot of middleware it's a lot easier to read. We may no longer be in the age of 80 char lines, but some of the route definitions end up well over 200 chars, which looks pretty unsightly to me.