mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Updates to contents for Android, server update, jszip updated to 3.1.1
This commit is contained in:
parent
155c3f123a
commit
874cabe510
6 changed files with 92 additions and 25 deletions
|
@ -1,5 +1,7 @@
|
|||
var connect = require('connect');
|
||||
var express = require('express');
|
||||
var http = require('http');
|
||||
var fs = require('fs');
|
||||
var serveStatic = require('serve-static');
|
||||
var morgan = require('morgan');
|
||||
var colors = require('colors');
|
||||
|
@ -33,11 +35,16 @@ function allowCrossDomain(req, res, next) {
|
|||
|
||||
|
||||
function listen(port) {
|
||||
var server = express();
|
||||
server.use(allowCrossDomain);
|
||||
server.use(serveStatic(path.resolve(__dirname, '../')));
|
||||
|
||||
if(!logger) server.use(morgan('dev'))
|
||||
var app = express();
|
||||
var staticServer = serveStatic(path.resolve(__dirname, '../'), {'index': ['index.html', 'index.htm']})
|
||||
|
||||
var server = http.createServer(app);
|
||||
|
||||
app.use(allowCrossDomain);
|
||||
app.use(staticServer);
|
||||
|
||||
if(!logger) app.use(morgan('dev'))
|
||||
|
||||
server.listen(port);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue