This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = require('common').app, | |
common = require('common'), | |
db = require('common').db, | |
io = require('common').socket, | |
//form = require('common').form; | |
formidable = require('formidable'), | |
util = require('util'), | |
fs = require('fs'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== model/dreamModel.js | |
DreamModel.prototype.save = function(articles, callback) { | |
if( typeof(articles.length) == 'undefined') { | |
articles = [articles]; | |
} | |
for(var i=0;i<articles.length;i++) { | |
article = articles[i]; | |
articles.created = new Date(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DreamModel.prototype.findAll = function(callback) { | |
this.db.view('dream/all', function(err, res) { | |
if (err) { | |
console.log(err) | |
} else { | |
var docs = []; | |
res.forEach(function (row) { | |
docs.push(row); | |
}); | |
callback(null, docs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am xsyn on github. | |
* I am xsyn (https://keybase.io/xsyn) on keybase. | |
* I have a public key whose fingerprint is FBAF 44F4 035D 5179 AEBA 3640 BD74 1D1B 1DBA 0FB7 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
;; Access Log Schema | |
{db/id #db/id[:db.part/db] | |
:db/ident :access/ip | |
:db/valueType :db.type/string | |
:db/cardinality :db.cardinality/one | |
:db/doc "Requester IP address" | |
:db.install/_attribute :db.part/db} | |
{db/id #db/id[:db.part/db] |
NewerOlder