summaryrefslogtreecommitdiffstats
path: root/controllers
diff options
context:
space:
mode:
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();
+ };
+};