all repos — litestore @ bfaf9633a6259f119b0c70ec12241fc952a4f6eb

A minimalist nosql document store.

app/js/models.js

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
var Page = {};

Page.get = function(id) {
  var content = m.prop("");
  return m.request({
      method: "GET", 
      url: "md/"+id+".md",
      deserialize: function(value) {return value;}
    }).then(function(content){ return marked(content)});
}

var Info = {};

Info.get = function(){
  var content = m.prop("");
  return m.request({
      method: "GET", 
      url: "/v1/info"
    }).then(content);
}