All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nodejs-express-server.controller.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
/**
 * The {{{classname}}}Controller file is a very simple one, which does not need to be changed manually,
 * unless there's a case where business logic reoutes the request to an entity which is not
 * the service.
 * The heavy lifting of the Controller item is done in Request.js - that is where request
 * parameters are extracted and sent to the service, and where response is handled.
 */

const Controller = require('./Controller');
const service = require('../services/{{{classname}}}Service');
{{#operations}}
{{#operation}}
const {{operationId}} = async (request, response) => {
  await Controller.handleRequest(request, response, service.{{operationId}});
};

{{/operation}}
{{/operations}}

module.exports = {
  {{#operations}}
  {{#operation}}
  {{operationId}},
  {{/operation}}
  {{/operations}}
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy