Skip to content

Commit 2684c2f

Browse files
Add files via upload
1 parent d14a06b commit 2684c2f

13 files changed

+1329
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# file-explorer
1+
simple app just using st lib

app.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Module dependencies.
3+
*/
4+
5+
var st = require('st');
6+
var express = require('express');
7+
var http = require('http');
8+
9+
10+
var app = express();
11+
12+
// all environments
13+
app.set('port', process.env.PORT || 3001);
14+
15+
app.get('/', function(request, response){
16+
response.sendFile(process.cwd() +'/index.html');
17+
});
18+
19+
// Static
20+
app.use(st({ path: './public', url: '/public' }));
21+
22+
http.createServer(app).listen(app.get('port'), function () {
23+
console.log('Express server listening on port ' + app.get('port'));
24+
});

app.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "goof",
3+
"scripts": {
4+
},
5+
"env": {
6+
"MONGOLAB_URI": {
7+
"required": true
8+
}
9+
},
10+
"formation": {
11+
"web": {
12+
"quantity": 1
13+
}
14+
},
15+
"addons": [
16+
"mongolab"
17+
],
18+
"buildpacks": [
19+
{
20+
"url": "heroku/nodejs"
21+
}
22+
]
23+
}

index.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<h1 id="page-title">Go ahead hack m3</h1>
5+
<h2 id="page-title">find the flag</h2>
6+
7+
<p>Take a look at our files <a href="/public/">here<a></p>
8+
9+
</body>
10+
</html>

0 commit comments

Comments
 (0)