├── .gitignore
├── README.md
├── collection
    ├── chatroom
    │   ├── app.dpd
    │   ├── public
    │   │   ├── css
    │   │   │   └── bootstrap.min.css
    │   │   ├── img
    │   │   │   ├── glyphicons-halflings-white.png
    │   │   │   └── glyphicons-halflings.png
    │   │   ├── index.html
    │   │   └── js
    │   │   │   ├── chatroom.js
    │   │   │   └── lib
    │   │   │       └── jquery.js
    │   └── resources
    │   │   └── messages
    │   │       ├── config.json
    │   │       ├── delete.js
    │   │       ├── post.js
    │   │       ├── put.js
    │   │       └── validate.js
    ├── comments-1
    │   ├── app.dpd
    │   ├── public
    │   │   ├── index.html
    │   │   └── script.js
    │   └── resources
    │   │   └── comments
    │   │       └── config.json
    ├── todo-app-angular
    │   ├── app.dpd
    │   ├── public
    │   │   ├── css
    │   │   │   └── bootstrap.min.css
    │   │   ├── img
    │   │   │   ├── glyphicons-halflings-white.png
    │   │   │   └── glyphicons-halflings.png
    │   │   ├── index.html
    │   │   └── js
    │   │   │   ├── lib
    │   │   │       ├── angular.js
    │   │   │       └── jquery.js
    │   │   │   └── todo.js
    │   └── resources
    │   │   └── todos
    │   │       └── config.json
    ├── todo-app-backbone
    │   ├── app.dpd
    │   ├── public
    │   │   ├── css
    │   │   │   └── bootstrap.min.css
    │   │   ├── img
    │   │   │   ├── glyphicons-halflings-white.png
    │   │   │   └── glyphicons-halflings.png
    │   │   ├── index.html
    │   │   └── js
    │   │   │   ├── lib
    │   │   │       ├── backbone-min.js
    │   │   │       ├── jquery.js
    │   │   │       └── underscore-min.js
    │   │   │   └── todo.js
    │   └── resources
    │   │   └── todos
    │   │       └── config.json
    └── todo-app
    │   ├── app.dpd
    │   ├── public
    │       ├── css
    │       │   └── bootstrap.min.css
    │       ├── img
    │       │   ├── glyphicons-halflings-white.png
    │       │   └── glyphicons-halflings.png
    │       ├── index.html
    │       └── js
    │       │   ├── lib
    │       │       └── jquery.js
    │       │   └── todo.js
    │   └── resources
    │       └── todos
    │           └── config.json
├── dpd-event
    └── custom-response-example
    │   ├── app.dpd
    │   ├── node_modules
    │       └── dpd-event
    │       │   ├── index.js
    │       │   └── package.json
    │   ├── package.json
    │   ├── public
    │       └── index.html
    │   └── resources
    │       ├── custom-users
    │           ├── config.json
    │           └── get.js
    │       └── users
    │           └── config.json
└── users
    ├── login-form
        ├── app.dpd
        ├── public
        │   ├── css
        │   │   └── bootstrap.min.css
        │   ├── img
        │   │   ├── glyphicons-halflings-white.png
        │   │   └── glyphicons-halflings.png
        │   ├── index.html
        │   ├── js
        │   │   └── lib
        │   │   │   └── jquery.js
        │   ├── register.html
        │   └── welcome.html
        └── resources
        │   └── users
        │       └── config.json
    └── micro-blog
        ├── app.dpd
        ├── public
            ├── css
            │   ├── bootstrap.min.css
            │   └── style.css
            ├── img
            │   ├── glyphicons-halflings-white.png
            │   └── glyphicons-halflings.png
            ├── index.html
            ├── js
            │   ├── global.js
            │   ├── index.js
            │   ├── lib
            │   │   ├── angular.js
            │   │   └── jquery.js
            │   ├── register.js
            │   └── user.js
            ├── partials
            │   ├── feed.html
            │   └── header.html
            ├── register.html
            └── user.html
        └── resources
            ├── posts
                ├── config.json
                ├── post.js
                ├── put.js
                └── validate.js
            └── users
                ├── config.json
                ├── put.js
                └── validate.js
/.gitignore:
--------------------------------------------------------------------------------
 1 | lib-cov
 2 | *.seed
 3 | *.log
 4 | *.csv
 5 | *.dat
 6 | *.out
 7 | *.pid
 8 | *.gz
 9 | 
10 | pids
11 | logs
12 | results
13 | 
14 | .dpd
15 | data
16 | 
17 | npm-debug.log
18 | .DS_Store
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
 1 | examples
 2 | ========
 3 | 
 4 | ## running
 5 | 
 6 | * Check [deployd's repository](https://github.com/deployd/deployd) for
 7 |   installation instructions.
 8 | 
 9 | * Run ` dpd ` on any folder below  `/collections`, `/users`, or `/dpd-event` and
10 | point your browser to **localhost:2403** to see the apps running, **localhost:2403/dashboard** for the deployd backend.
11 | 
--------------------------------------------------------------------------------
/collection/chatroom/app.dpd:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/collection/chatroom/public/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deployd/examples/db2c9b259f02baeaf5f965b8970ffb31c7108d29/collection/chatroom/public/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/collection/chatroom/public/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deployd/examples/db2c9b259f02baeaf5f965b8970ffb31c7108d29/collection/chatroom/public/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/collection/chatroom/public/index.html:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 	Deployd Todos
 5 |   
 6 |   
15 | 
16 | 
17 |   
18 |     
Deployd Chatroom
19 |     
22 |     
27 |     
Open this page in multiple browser windows to see it update in real time!
28 |   
19 |       
21 |       
22 |       
34 |     
35 |     
36 |     
37 |     
38 |     
39 |   
40 |   
--------------------------------------------------------------------------------
/collection/comments-1/public/script.js:
--------------------------------------------------------------------------------
 1 | function showError(error) {
 2 |   var message = "An error occured";
 3 |   if (error.message) {
 4 |       message = error.message;
 5 |   } else if (error.errors) {
 6 |       var errors = error.errors;
 7 |       message = "";
 8 |       Object.keys(errors).forEach(function(k) {
 9 |           message += k + ": " + errors[k] + "\n";
10 |       });
11 |   }
12 |   
13 |   alert(message);
14 | }
15 | 
16 | $(document).ready(function() {
17 | 
18 |   loadComments();
19 | 
20 |   $('#refresh-btn').click(loadComments);
21 | 
22 |   $('#comment-form').submit(function() {
23 |     //Get the data from the form
24 |     var name = $('#name').val();
25 |     var comment = $('#comment').val();
26 | 
27 |     dpd.comments.post({
28 |         name: name,
29 |         comment: comment
30 |     }, function(comment, error) {
31 |         if (error) return showError(error);
32 |         
33 |         addComment(comment);
34 |         $('#name').val('');
35 |         $('#comment').val('');
36 |     });
37 | 
38 |     return false;
39 |   });
40 | 
41 |   function loadComments() {
42 |     dpd.comments.get(function(comments, error) { //Use dpd.js to send a request to the backend
43 |       $('#comments').empty(); //Empty the list
44 |       comments.forEach(function(comment) { //Loop through the result
45 |         addComment(comment); //Add it to the DOM.
46 |       });
47 |     });
48 |   }
49 | 
50 |   function addComment(comment) {
51 |     var editLink = $('Edit');
52 |     var deleteLink = $('Delete');
53 | 
54 |     var div = $('
' + comment.comment + '
') 58 | .appendTo('#comments'); 59 | 60 | deleteLink.click(function() { 61 | dpd.comments.del(comment.id, function(success, error) { 62 | if (error) return showError(error); 63 | div.remove(); 64 | }); 65 | return false; 66 | }); 67 | 68 | editLink.click(function() { 69 | var newComment = prompt("Enter the new comment text:", comment.comment); 70 | if (newComment) { 71 | dpd.comments.put(comment.id, {comment: newComment}, function(result, error) { 72 | if (error) { return showError(error); } 73 | comment = result; 74 | div.find('p').text(comment.comment); 75 | }); 76 | } 77 | return false; 78 | }); 79 | } 80 | 81 | }); -------------------------------------------------------------------------------- /collection/comments-1/resources/comments/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Collection", 3 | "properties":{ 4 | "comment":{ 5 | "required":true, 6 | "type":"string", 7 | "typeLabel":"string", 8 | "id":"comment" 9 | }, 10 | "name":{ 11 | "required":false, 12 | "type":"string", 13 | "typeLabel":"string", 14 | "id":"name" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /collection/todo-app-angular/app.dpd: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /collection/todo-app-angular/public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deployd/examples/db2c9b259f02baeaf5f965b8970ffb31c7108d29/collection/todo-app-angular/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /collection/todo-app-angular/public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deployd/examples/db2c9b259f02baeaf5f965b8970ffb31c7108d29/collection/todo-app-angular/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /collection/todo-app-angular/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Deployd Todos
12 |You don't have any todos! Add one now:
13 |14 |- 
15 |         
19 |       20 |
21 | 25 |26 | Remove completed items 27 |
28 |Deployd Todos
10 |You don't have any todos! Add one now:
11 |12 |
13 | 17 |18 | Remove completed items 19 |
20 |Deployd Todos
10 |You don't have any todos! Add one now:
11 |12 |
13 | 17 |18 | Remove completed items 19 |
20 |