Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var Common = require('common');
var Evt = require('evt');
var app = require('electron').remote.app; // .require('app');
var basePath = app.getPath('appData') + '/leanote'; // /Users/life/Library/Application Support/Leanote'; // require('nw.gui').App.dataPath;
Evt.setDataBasePath(basePath);
var protocol = require('electron').protocol; // .require('protocol');
// 数据库初始化
var db = require('db');
// db.init();
db.initGlobal();
// 所有service, 与数据库打交道
var Service = {
notebookService: require('notebook'),
noteService: require('note'),
userService: require('user'),
tagService: require('tag'),
apiService: require('api'),
syncServie: require('sync')
};
// 全局变量
var ApiService = Service.apiService;
var Common = require('common');
var Evt = require('evt');
var app = require('remote').require('app');
var basePath = app.getPath('appData') + '/leanote'; // /Users/life/Library/Application Support/Leanote'; // require('nw.gui').App.dataPath;
Evt.setDataBasePath(basePath);
if(!/login.html/.test(location.href)) {
// 启动服务器, 图片
var Server = require('server');
Server.start();
}
var db = require('db');
db.init();
// 所有service, 与数据库打交道
var Service = {
notebookService: require('notebook'),
noteService: require('note'),
userService: require('user'),
tagService: require('tag'),
var Common = require('common');
var Evt = require('evt');
var app = require('remote').require('app');
var basePath = app.getPath('appData') + '/leanote'; // /Users/life/Library/Application Support/Leanote'; // require('nw.gui').App.dataPath;
Evt.setDataBasePath(basePath);
// 所有service, 与数据库打交道
var Service = {
userService: require('user'),
apiService: require('api'),
};
var db = require('db');
db.initForLogin();
// 全局变量
var ApiService = Service.apiService;
var UserService = Service.userService;
var EvtService = require('evt');
var CommonService = Common;
var Common = require('common');
var Evt = require('evt');
var app = require('remote').require('app');
var basePath = app.getPath('appData') + '/leanote'; // /Users/life/Library/Application Support/Leanote'; // require('nw.gui').App.dataPath;
Evt.setDataBasePath(basePath);
// 所有service, 与数据库打交道
var Service = {
userService: require('user'),
apiService: require('api'),
};
var db = require('db');
db.initGlobal();
// 全局变量
var ApiService = Service.apiService;
var UserService = Service.userService;
var EvtService = require('evt');
var CommonService = Common;