summaryrefslogtreecommitdiffstats
path: root/controllers
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-06-02 16:55:36 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-06-02 16:55:36 +0200
commit443bee744a867fa116ebe45f55cdedfef77ade96 (patch)
tree90f6aa9abb2d52d9730116b78fdb65149475eb04 /controllers
parent0076d8ccd0598448e641a31ceee4257368ecc01d (diff)
downloadmean-app-443bee744a867fa116ebe45f55cdedfef77ade96.zip
mean-app-443bee744a867fa116ebe45f55cdedfef77ade96.tar.gz
add controllers
Diffstat (limited to 'controllers')
-rw-r--r--controllers/MovieController.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/controllers/MovieController.js b/controllers/MovieController.js
new file mode 100644
index 0000000..5cb7681
--- /dev/null
+++ b/controllers/MovieController.js
@@ -0,0 +1,15 @@
+var restful = require('node-restful');
+
+module.exports = function(app, route) {
+
+ var rest = restful.model(
+ 'movie',
+ app.models.movie
+ ).methods(['get', 'put', 'post', 'delete']);
+
+ rest.register(app, route);
+
+ return function(req, res, next) {
+ next();
+ };
+};