play-routes-from-json

    0.1.0 • Public • Published

    play-routes-from-json NPM version Build Status

    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

    Install

    npm i play-routes-from-json

    DownloadsWeekly Downloads

    3

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • charliedowler