UNPKG

cleverstack-cli

Version:

Command line interface for CleverTech's CleverStack

38 lines (35 loc) 943 B
/** * @doc module * @name exampleModule * @description * This is an example description generated by CleverStack */ /** * @doc module * @name exampleModule.controllers:{{Template}}Controller * @description * Sets up a controller within CleverStack */ module.exports = function( {{Template}}Service ) { return (require('classes').Controller).extend( { service: {{Template}}Service }, { /** * 'GET/PUT/POST/DELETE /{{_template_}}/custom' */ customAction: function() { this.send({ message: "Hello from customAction inside {{Template}}Controller" }); }, /** * This function can never be called because it does not have 'Action' on the end of it */ hidden: function() { console.log('Hidden function called, this should be impossible'); process.exit(); } }); }