Create temp container for testing
This commit is contained in:
parent
24509834dd
commit
f7f851b4dd
|
@ -13,14 +13,18 @@ app.configure(function () {
|
||||||
app.use(app.router);
|
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'});
|
var handler = new StorageService({provider: 'filesystem', root: '/tmp/storage'});
|
||||||
|
|
||||||
app.get('/', function (req, res, next) {
|
app.get('/', function (req, res, next) {
|
||||||
res.setHeader('Content-Type', 'text/html');
|
res.setHeader('Content-Type', 'text/html');
|
||||||
var form = "<html><body><h1>Storage Service Demo</h1>" +
|
var form = "<html><body><h1>Storage Service Demo</h1>" +
|
||||||
"<a href='/download'>List all containers</a><p>" +
|
"<a href='/download'>List all containers</a><p>" +
|
||||||
"Upload to container c1: <p>" +
|
"Upload to container con1: <p>" +
|
||||||
"<form method='POST' enctype='multipart/form-data' action='/upload/c1'>"
|
"<form method='POST' enctype='multipart/form-data' action='/upload/con1'>"
|
||||||
+ "File to upload: <input type=file name=uploadedFiles multiple=true><br>"
|
+ "File to upload: <input type=file name=uploadedFiles multiple=true><br>"
|
||||||
+ "Notes about the file: <input type=text name=note><br>"
|
+ "Notes about the file: <input type=text name=note><br>"
|
||||||
+ "<input type=submit value=Upload></form>" +
|
+ "<input type=submit value=Upload></form>" +
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
"asteroid": "git+ssh://git@github.com/strongloop/asteroid.git",
|
"asteroid": "git+ssh://git@github.com/strongloop/asteroid.git",
|
||||||
"formidable": "latest",
|
"formidable": "latest",
|
||||||
"mocha": "latest",
|
"mocha": "latest",
|
||||||
"supertest": "latest"
|
"supertest": "latest",
|
||||||
|
"mkdirp": "latest"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in New Issue