var loopback = require('loopback') , app = module.exports = loopback(); var path = require('path'); app.use(app.router); // expose a rest api app.use(loopback.rest()); app.configure(function () { app.set('port', process.env.PORT || 3000); }); var ds = loopback.createDataSource({ connector: require('../index'), provider: 'filesystem', root: path.join(__dirname, 'storage') }); var container = ds.createModel('container'); app.model(container); app.get('/', function (req, res, next) { res.setHeader('Content-Type', 'text/html'); var form = "
" + "Upload to container c1:
" + "
" + ""; res.send(form); res.end(); }); app.listen(app.get('port')); console.log('http://127.0.0.1:' + app.get('port'));