mirror of
https://github.com/SunRed/haste-server.git
synced 2025-09-05 21:10:16 +02:00
Made server run async
This commit is contained in:
parent
78aabf90bb
commit
f3288c4e39
3 changed files with 28 additions and 23 deletions
|
@ -46,7 +46,7 @@ FileDocumentStore.prototype.set = function(key, data, callback, skipExpire) {
|
|||
// Get data from a file from key
|
||||
FileDocumentStore.prototype.get = function(key, callback, skipExpire) {
|
||||
const _this = this;
|
||||
const fn = this.basePath + '/' + FileDocumentStore.md5(key);
|
||||
const fn = require('path').join(this.basePath, FileDocumentStore.md5(key));
|
||||
fs.readFile(fn, 'utf8', function(err, data) {
|
||||
if (err) {
|
||||
callback(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue