Commit c10e69bf by Johannes Zellner

Add welcome screen

1 parent c88ec639
......@@ -20,9 +20,13 @@ router.get('/api/files/*', files.get);
router.put('/api/files/*', multipart, files.put);
router.delete('/api/files/*', files.del);
// healthcheck in case / does not serve up any file yet
router.get('/', function (req, res) { res.sendfile(path.join(__dirname, '/app/welcome.html')); });
app.use(morgan('dev'));
app.use(compression());
app.use(bodyParser.json());
app.use('/settings', express.static(__dirname + '/app'));
app.use(express.static(__dirname + '/files'));
app.use(router);
app.use(lastMile());
......
This diff could not be displayed because it is too large.
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
.wrapper {
display: table;
width: 100%;
height: 100%;
}
.content {
display: table-cell;
width: 100%;
height: 100%;
text-align: center;
vertical-align: middle;
}
pre {
margin: auto;
text-align: left;
width: 400px;
}
\ No newline at end of file
<html>
<head>
<title> Cloudron Surfer </title>
<link rel="stylesheet" href="/settings/css/bootstrap.min.css">
<link rel="stylesheet" href="/settings/css/style.css">
</head>
<body>
<div class="wrapper">
<div class="content">
<img src="/settings/img/logo.png"/>
<h1> Cloudron Surfer </h1>
<p>
Upload some files using the commandline tool.
</p>
<pre>
npm -g install cloudron-surfer
surfer login http://test-foobar
surfer put [file]</pre>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
</div>
</body>
</html>
......@@ -20,6 +20,8 @@ function checkConfig() {
console.log('You have run "login" first');
process.exit(1);
}
console.log('Using server %s', config.server().yellow);
}
function collectFiles(filesOrFolders) {
......
{
"name": "surfer",
"name": "cloudron-surfer",
"version": "1.0.0",
"description": "Simple file server",
"main": "app.js",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!