Create temp container for testing

This commit is contained in:
Raymond Feng 2013-07-10 13:17:51 -07:00
parent 24509834dd
commit f7f851b4dd
2 changed files with 8 additions and 3 deletions

View File

@ -13,14 +13,18 @@ app.configure(function () {
app.use(app.router);
});
// Create the container
var mkdirp = require('mkdirp');
mkdirp.sync('/tmp/storage/con1');
var handler = new StorageService({provider: 'filesystem', root: '/tmp/storage'});
app.get('/', function (req, res, next) {
res.setHeader('Content-Type', 'text/html');
var form = "<html><body><h1>Storage Service Demo</h1>" +
"<a href='/download'>List all containers</a><p>" +
"Upload to container c1: <p>" +
"<form method='POST' enctype='multipart/form-data' action='/upload/c1'>"
"Upload to container con1: <p>" +
"<form method='POST' enctype='multipart/form-data' action='/upload/con1'>"
+ "File to upload: <input type=file name=uploadedFiles multiple=true><br>"
+ "Notes about the file: <input type=text name=note><br>"
+ "<input type=submit value=Upload></form>" +

View File

@ -15,7 +15,8 @@
"asteroid": "git+ssh://git@github.com/strongloop/asteroid.git",
"formidable": "latest",
"mocha": "latest",
"supertest": "latest"
"supertest": "latest",
"mkdirp": "latest"
},
"repository": {
"type": "git",