being used symfony, wonder if there way set routes using annotations in nodejs.
for example, let's have following code:
/** * @route('/', method="get") */ var homeaction = function(req, res){ }
and somehow compile following:
var router = require('my-actual-router'); var homeaction = function(req, res){ } router.get('/', homeaction);
i have found npm packages can used parse annotations not tools use annotations generate actual javascript code , wonder if there obscure tool i'm missing before start writing own.
i have been using package called routing-controllers build expressjs route using annotations. pretty , in general works expected.
it have requirement might deter many: built using typescript , might not usable out of box on vanilla javascript node projets.