compoundjs

Compound JS Relationship Access

北城以北 提交于 2020-01-04 05:48:08
问题 I have defined 2 schema objects as below (for use in a mongodb) var User = describe('User', function () { property('name', String); property('email', String); property('password', String); set('restPath', pathTo.users); }); var Message = describe('Message', function () { property('userId', String, { index : true }); property('content', String); property('timesent', Date, { default : Date }); property('channelid', String); set('restPath', pathTo.messages); }); Message.belongsTo(User, {as:

securing the source code in a node-webkit desktop application

安稳与你 提交于 2019-12-20 10:14:09
问题 first things first , i have seen nwsnapshot. and its not helping. i am building an inventory management system as a desktop app using node-webkit . the project being built is using compoundjs (mvc javascript library). which have a definite folder structure (you know mvc) and multiple javascript files inside them. the problem is nwsnapshot allows the app to have only a single snapshot file but the logic of application is spread over all the folders in different javascript files. so how do i

Compound/Express JS: Multiple sessions per user

别来无恙 提交于 2019-12-12 02:24:01
问题 I have an app that is creating 2 sessions for each user. I have located the source of the issue, but I do not fully understand why it's happening and how to fix it. Let's say I scaffold an example app like so: compound init blah cd blah npm install npm install connect-mongo compound g c mytest Make config/environment.js look like this: module.exports = function (compound) { var express = require('express'); var app = compound.app; var secret = 'secret'; // Need this to check if there's been

How to setup Mocha tests with Node.js and Passport

走远了吗. 提交于 2019-12-05 04:54:26
问题 In an application built with Node.js (CompoundJS + PassportJS), how can the Mocha tests be run on the controllers that are locked down and require login? I have tried using Superagent but am not having much luck and to use it the server needs to be running to run the tests. I've gotten very close with this method, but don't want to have to have the server running to run unit tests. I also tried including passport and using request.login method, I ended up at a point where I kept getting the

securing the source code in a node-webkit desktop application

假装没事ソ 提交于 2019-12-02 20:46:45
first things first , i have seen nwsnapshot . and its not helping. i am building an inventory management system as a desktop app using node-webkit . the project being built is using compoundjs (mvc javascript library). which have a definite folder structure (you know mvc) and multiple javascript files inside them. the problem is nwsnapshot allows the app to have only a single snapshot file but the logic of application is spread over all the folders in different javascript files. so how do i secure my source code before shipping it to client? Or any other work-around Or smarter way (yes, i know

One to Many relationship in CompoundJS

丶灬走出姿态 提交于 2019-11-29 07:38:13
I'm new to CompoundJS and I had a problem in setting up a one to many relationsip with jugglingDB.I'm using MySQL as database. I have set up two model Book and Author. Book has many authors. This is my schema.js (db/schema.js): var Book = describe('Book', function () { property('title', String); property('isbn', String); property('authorId', Number); set('restPath', pathTo.books); }); var Author = describe('Author', function () { property('name', String); property('authorId', Number); set('restPath', pathTo.authors); }); I put the relationship in the models/Book.js. This is my Book.js (models

One to Many relationship in CompoundJS

老子叫甜甜 提交于 2019-11-28 01:34:33
问题 I'm new to CompoundJS and I had a problem in setting up a one to many relationsip with jugglingDB.I'm using MySQL as database. I have set up two model Book and Author. Book has many authors. This is my schema.js (db/schema.js): var Book = describe('Book', function () { property('title', String); property('isbn', String); property('authorId', Number); set('restPath', pathTo.books); }); var Author = describe('Author', function () { property('name', String); property('authorId', Number); set(