Skip to content

Commit 77c345a

Browse files
committed
added in static file server
1 parent bfc0f6f commit 77c345a

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"author": "Brian Gonzalez",
33
"name": "jquery.adaptive-backgrounds",
44
"description": "A simple jQuery plugin to extract the dominant color of an image and apply it to the background of its parent element.",
5-
"version": "1.0.1",
5+
"version": "1.0.2",
66
"repository": {
77
"url": "http://briangonzalez.github.io/jquery.adaptive-backgrounds.js/"
88
},
99
"main": "./dist/jquery.adaptive-backgrounds.min",
10-
"dependencies": {},
1110
"devDependencies": {
11+
"express": "^4.8.5",
12+
"serve-index": "^1.1.6"
1213
},
13-
"optionalDependencies": {},
1414
"engines": {
1515
"node": "*"
1616
}

static.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var express = require('express');
2+
var serveIndex = require('serve-index');
3+
var app = express();
4+
5+
// var index = serveIndex('public/ftp', {'icons': true})
6+
7+
app.use(express.static(__dirname));
8+
app.use('/', serveIndex(__dirname, { 'icons': true }));
9+
10+
var port = 11111;
11+
console.log(' ** Serving static content on port ' + port);
12+
app.listen(process.env.PORT || 11111);

0 commit comments

Comments
 (0)