Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

PUBLIC / surfer-okd

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit c10e69bf authored 9 years ago by Johannes Zellner's avatar Johannes Zellner
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

Add welcome screen

1 parent c88ec639
Expand all Hide whitespace changes
Inline Side-by-side
Showing with 66 additions and 1 deletions
  • app.js
  • app/css/bootstrap.min.css
  • app/css/style.css
  • app/img/logo.png
  • app/js/bootstrap.min.js
  • app/welcome.html
  • cli/actions.js
  • package.json
app.js
View file @c10e69b
...@@ -20,9 +20,13 @@ router.get('/api/files/*', files.get); ...@@ -20,9 +20,13 @@ router.get('/api/files/*', files.get);
router.put('/api/files/*', multipart, files.put); router.put('/api/files/*', multipart, files.put);
router.delete('/api/files/*', files.del); 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(morgan('dev'));
app.use(compression()); app.use(compression());
app.use(bodyParser.json()); app.use(bodyParser.json());
app.use('/settings', express.static(__dirname + '/app'));
app.use(express.static(__dirname + '/files')); app.use(express.static(__dirname + '/files'));
app.use(router); app.use(router);
app.use(lastMile()); app.use(lastMile());
......
This diff is collapsed. Click to expand it.
app/css/bootstrap.min.css 0 → 100644
View file @c10e69b
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
app/css/style.css 0 → 100644
View file @c10e69b
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
This diff is collapsed. Click to expand it.
app/img/logo.png 0 → 100644
View file @c10e69b
app/img/logo.png

7.02 KB

This diff is collapsed. Click to expand it.
app/js/bootstrap.min.js 0 → 100644
View file @c10e69b
This diff is collapsed. Click to expand it.
app/welcome.html 0 → 100644
View file @c10e69b
<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>
This diff is collapsed. Click to expand it.
cli/actions.js
View file @c10e69b
...@@ -20,6 +20,8 @@ function checkConfig() { ...@@ -20,6 +20,8 @@ function checkConfig() {
console.log('You have run "login" first'); console.log('You have run "login" first');
process.exit(1); process.exit(1);
} }
console.log('Using server %s', config.server().yellow);
} }
function collectFiles(filesOrFolders) { function collectFiles(filesOrFolders) {
......
This diff is collapsed. Click to expand it.
package.json
View file @c10e69b
{ {
"name": "surfer", "name": "cloudron-surfer",
"version": "1.0.0", "version": "1.0.0",
"description": "Simple file server", "description": "Simple file server",
"main": "app.js", "main": "app.js",
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
  • Please register or sign in to post a comment