Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jamhall committed Jan 28, 2015
1 parent dc08729 commit 5e3b830
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,27 @@ To run the test suite, first install the dependencies, then run `npm test`:
$ npm install
$ npm test
```

## Programmatically running s3rver

You can also run s3rver programmatically.

> This is particularly useful if you want to integrate s3rver into another projects tests that depends on access to an s3 environment
Example in mocha:
```
before(function (done) {
var S3rver = require('s3rver');
var s3rver = new S3rver();
s3rver.setHostname('localhost')
.setPort(4568)
.setDirectory('/tmp/s3rver')
.setSilent(false)
.run(function (err, host, port) {
if(err) {
return done(err);
}
done();
});
});
```

0 comments on commit 5e3b830

Please sign in to comment.