play-routes-from-json
v0.1.0
Published
Convert your play routes from a nicer json format
Downloads
3
Readme
play-routes-from-json
Convert your play routes file to a nicer json format
See play-routes-to-json to parse a routes file to your new JSON format.
Install
$ npm install --save play-routes-from-json
Usage
var routesFromJSON = require('play-routes-from-json');
var fs = require('fs');
fs.readFile('conf/routes.json', function(err, data) {
var parsed = JSON.parse(data.toString()).routes;
console.log(routesFromJSON(parsed));
//=> GET /path/to/action @controllers.handleAction()
});
License
MIT © Charlie Dowler