module.exports = (function() {

  'use strict';

  const Nodal = require('nodal');

  class CORSMiddleware extends Nodal.Middleware {

    exec(controller, data, callback) {

      controller.allowOrigin('*');

      callback(null, data);

    }

  }

  return CORSMiddleware;

})();

module.exports = (function() {

  'use strict';

  const Nodal = require('nodal');

  class CORSMiddleware extends Nodal.Middleware {

    exec(controller, data, callback) {

      controller.allowOrigin('*');

      callback(null, data);
      return false;

    }

  }

  return CORSMiddleware;

})();

Update CORS sample middleware to match the current template the cli generator uses
Update CORS sample middleware to match the current template the cli generator uses
