Questions tagged [compoundjs]

CompoundJS is the Node.JS MVC framework based on ExpressJS.

CompoundJS is the Node.JS MVC framework based on ExpressJS, fully ExpressJS-compatible. It allows you to build well-structured web applications.

The main objective of the framework — web development without pain.

Guides

80 questions
2
votes
1 answer

JugglingDB custom query

I am trying to figure how to create a "repository" file (for the symfony2 users) where i will put all my special behaviour queries. I have a simple db shema with : User (email) RelationType (name) UserXUserXRelation (fromUser, toUser, relation) I…
Jihel
  • 796
  • 1
  • 5
  • 13
2
votes
1 answer

How to add a custom property to model in jugglingdb and have it returned via JSON

How do I add a custom property to a jugglingdb model? I want to define a custom property specifically versus a custom method because I want to return it to the client. Here is an example using the ubiquitous Post model: db/schema.js: var Post =…
absynce
  • 1,399
  • 16
  • 29
2
votes
1 answer

How do I pass parameters through "use" method in CompoundJS?

I am using CompoundJS (an MVC for Express / NodeJS). To share code between controllers the Doc says that on controller1.js I can share a method by using publish method: /***controller1.js***/ function sharedFunction ()…
2
votes
1 answer

compound db update/migrate not working in mysql

I've followed this guide http://compoundjs.com/docs to create a very basic REST server. It worked when using memory as storage. After that, I tried to move to mysql. When executing "compound db migrate" (or update) the response is: Perform migrate…
2
votes
1 answer

Socket hang up error in http request on nodejs

hi am new to nodejs by using compound as framework, i have been getting error when request through on https. i tried simple code is action(function getteams(req){ Mymodel.find({"season": body.year}, function(err, team){ console.log("Season…
God
  • 674
  • 2
  • 6
  • 31
2
votes
1 answer

CompoundJS in production mode renders webpage instead of retrieving JSON data

I'm new to CompoundJS and I'm not too sure if this is the correct behaviour. I'm starting the server on PROD mode with the following code: NODE_ENV=production compound server 8081 Then I hit: http://localhost:8081/categories/ I was excepting to…
Pablo
  • 2,540
  • 1
  • 18
  • 26
2
votes
1 answer

Compound JS Relationship Access

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…
Mike Wade
  • 1,726
  • 1
  • 15
  • 28
2
votes
1 answer

Helper in NodeJS+CompoundJS

I'm just starting out in CompoundJs and there's a lot I still need to learn. I'm just trying to figure out how Helpers work in NodeJS+CompoundJS, from what I've seen so far Helpers are intended to be used with Views and not so much with your…
Okky
  • 10,338
  • 15
  • 75
  • 122
2
votes
3 answers

Templating engines in Compound JS

I was trying to set jade as my default template engine in compound js. As i was going through the documentation i found Templating engines By default railway use ejs templating engine, but you can switch to jade, using settings app.set('view…
Okky
  • 10,338
  • 15
  • 75
  • 122
1
vote
0 answers

How to fix undefined in first iteration on javascript

I got undefined in the first iteration any comments is helpful to me thanks in advance for (i = 0; i <= nummonth; i++) { var res = compound * (Math.pow(interest, i)); res = res.toFixed(0); var tableHTML; var interestgained = (+res *…
1
vote
1 answer

npm install compound Fails With "TypeError: Cannot Call Method 'filter' of Undefined"

I tried to install compound.js for Cozy, but I got an error that it could not call method 'filter' of undefined. 170 verbose read json /root/tmp/npm-853/1395045094633-0.8364134922157973/package/package.json 171 silly lockFile…
Brandon Anzaldi
  • 6,884
  • 3
  • 36
  • 55
1
vote
1 answer

NodeJS - error with callbacks

I'm trying to implement local auth using Compoundjs, Passportjs (compound-passport) and Bcryptjs. Here is my code: define new strategy var Strategy = require('passport-local').Strategy; passport.use(new Strategy({ usernameField:…
Digital God
  • 471
  • 1
  • 5
  • 17
1
vote
2 answers

CompoujdJS Generators Missing

I am new to compoundjs and have started creating helloworld samples for compoundjs. I tried to use the default generators, but in my app the only available generator is app, the rest like controller, model are missing. Below is the output when i…
balanv
  • 10,686
  • 27
  • 91
  • 137
1
vote
1 answer

CompoundJS :: How to create the schema to reflect a semi complex JSON object?

If my schema is as follows: var Configuration = describe('Configuration', function () { property('name', String); set('restPath', pathTo.configurations); }); var Webservice = describe('Webservice', function () { property('wsid',…
1
vote
2 answers

How to handle separate layouts of different namespaces in compoundjs

Hey guys i am a noob who has just started working on nodejs . I am developing a web application on nodejs using compoundjs. This is the structure of my view folder views/ |-- admin | |-- games | |-- squadplayertypes | `-- toursection | …
guruwinder
  • 64
  • 5