mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-14 15:11:24 +00:00
22 lines
498 B
JavaScript
22 lines
498 B
JavaScript
var fs = require('fs');
|
|
var User = require('user');
|
|
|
|
function log(o) {console.log(o)}
|
|
var Evt = {
|
|
leanoteUrl: 'http://localhost:9000',
|
|
port: 8008,
|
|
localUrl: 'http://127.0.0.1:8008',
|
|
getImageLocalUrl: function(fileId) {
|
|
return this.localUrl + '/api/file/getImage?fileId=' + fileId;
|
|
},
|
|
// 项目绝对地址
|
|
getBasePath: function() {
|
|
return process.cwd();
|
|
},
|
|
getAbsolutePath: function(relative) {
|
|
var me = this;
|
|
return me.getBasePath() + '/' + relative;
|
|
}
|
|
};
|
|
module.exports = Evt;
|