How to use the evt.setDataBasePath function in evt

To help you get started, we’ve selected a few evt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leanote / desktop-app / public / js / app / service.js View on Github external
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;
github leanote / desktop-app / src / public / js / app / service.js View on Github external
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'),
github leanote / desktop-app / src / public / js / app / service_login.js View on Github external
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;
github leanote / desktop-app / public / js / app / service_login.js View on Github external
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;