mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
Fix deprecated method root for send module
This commit is contained in:
@@ -7,7 +7,6 @@ var tinylr = require('tiny-lr');
|
||||
var Promise = require('../utils/promise');
|
||||
var PluginsManager = require('../plugins');
|
||||
var Book = require('../book');
|
||||
var initBook = require('../init');
|
||||
|
||||
var helper = require('./helper');
|
||||
var Server = require('./server');
|
||||
|
||||
+3
-2
@@ -64,8 +64,9 @@ Server.prototype.start = function(dir, port) {
|
||||
}
|
||||
|
||||
// Send file
|
||||
send(req, url.parse(req.url).pathname)
|
||||
.root(dir)
|
||||
send(req, url.parse(req.url).pathname, {
|
||||
root: dir
|
||||
})
|
||||
.on('error', error)
|
||||
.on('directory', redirect)
|
||||
.pipe(res);
|
||||
|
||||
Reference in New Issue
Block a user