mirror of
https://github.com/sstent/alex_app1.git
synced 2026-01-25 16:42:02 +00:00
14 lines
399 B
JavaScript
14 lines
399 B
JavaScript
var db = require('./config').db;
|
|
|
|
db.gridfs().open('test.txt', 'w', function(err, gs) {
|
|
gs.write('blablabla', function(err, reply) {
|
|
gs.close(function(err, reply){
|
|
db.gridfs().open('test.txt', 'r' ,function(err, gs) {
|
|
gs.read(function(err, reply){
|
|
console.log(reply.toString());
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|