Events:
- end - once all data has been read and ...
| $ ./test.js -b my-bucket | |
| Bucket=my-bucket | |
| Concurrency=3 | |
| Bucket=my-bucket | |
| Concurrency=undefined |
| var http = require('http'); | |
| http.createServer(function (req, res) { | |
| res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| res.end('Hello World\n'); | |
| }).listen(1337, '127.0.0.1', function() { | |
| console.log('listening'); | |
| }); | |
| console.log('Server running at http://127.0.0.1:1337/'); |
| var fmt = require('fmt'); | |
| var pg = require('pg'); | |
| var conString = "pg://scroober@localhost/scroober"; | |
| pg.connect(conString, function(err, cl) { | |
| if (err) { | |
| console.log(err); | |
| return; | |
| } |
| grunt.registerMultiTask('s3deploy', 'deploy to S3 using awssum', function () { | |
| // dependencies | |
| var awssum = require('awssum'), | |
| fs = require('fs'), | |
| path = require('path'), | |
| aws = require('./settings').aws; | |
| var amz = awssum.load('amazon/amazon'), | |
| AmazonS3 = awssum.load('amazon/s3'), | |
| s3 = new AmazonS3({ |
| $ npm test | |
| > sound@0.1.0 test /home/chilts/src/appsattic-sound | |
| > tap test/*.js | |
| not ok test/basic.js .................................... 6/9 | |
| Command: "node" "basic.js" | |
| TAP version 13 | |
| ok 1 is an object | |
| ok 2 string passes |
| models = require './' | |
| sql = require 'sql' | |
| crypto = require 'crypto' | |
| Downstairs = require('downstairs').Downstairs | |
| Table = require('downstairs').Table | |
| env = require './../config/env' | |
| uuid = require 'node-uuid' | |
| logging = require './../lib/logging' | |
| moment = require 'moment' |
| var async = require('async'); | |
| var pg = require('pg'); | |
| var connString = "postgres://postgres@localhost/template1"; | |
| // attempt 1 - all ok | |
| pg.connect(connString, function(err, client, done) { | |
| // this function has a .length of 3 ... therefore done is defined | |
| console.log('1) Connected ok'); | |
| done(); | |
| // pg.end(); |
(Ends)
| // this needs to be read from the DB on startup | |
| var userId = 1; | |
| function putUser(user, cb) { | |
| // am making this up for the purposes of demonstration - don't know what your use-case is | |
| userId++; | |
| user.id = userId; | |
| var ops = [ | |
| { type: 'put', key: 'sequence:userId', value : userId }, |