Questions tagged [locomotivejs]

Locomotive is a web framework for Node.js. Instilled with familiar MVC patterns and a conventional file layout.

Locomotive is a web framework for Node.js. Instilled with familiar MVC patterns and a conventional file layout.

See http://locomotivejs.org/

Features

  • MVC architecture
  • Convention over configuration
  • Expressive routing
  • Routing helpers
  • Connects to any database
  • Renders with any template engine
  • Adheres to REST principles
  • Built on Express

Community

65 questions
0
votes
1 answer

How to return values from Mongoose query

I am working on a registration piece that does some server side validation before entering the data to mongo. I am very new to mongoose and am having trouble returning data to a method that completes all the registration process. In my locomotive…
lumberjacked
  • 966
  • 1
  • 21
  • 35
0
votes
1 answer

starting the locomotive.js application using nodemon

I've built an application using the Locomotive.JS MVC framework for node (locomotive is built upon express) , i wanted know how to start this application using nodemon??
Karthic Rao
  • 3,624
  • 8
  • 30
  • 44
0
votes
1 answer

How to obtain logs in locomotiveJS?

I am new to the locomotiveJS framework. I want to test my code and log some data. What is the proper way of loggin info in locomotiveJS?
ashim
  • 24,380
  • 29
  • 72
  • 96
0
votes
1 answer

Controlling Session Start with LocomotiveJS

I know it is possible to control session start with express and connect middleware. Like suggested here: Controlling Session Start with express and connect middleware Is it possible to control session start with LocomotiveJS? I don't want to start…
irla
  • 479
  • 3
  • 13
0
votes
1 answer

"Before All" filter broken if defined in the controller?

In my controller I define PagesController.before('*', function(next) { console.log('zip'); next(); }); And in routes.js I have this.resources('pages', { only: [ 'index'] }) The "before" filter wasn't being executed. It looks like the code in…
0
votes
3 answers

Getting the error "no strategy registered under name: local" using passport

I'm using Locomotive, attempting to use passport. Still getting my head around the require function as the various guides aren't particularly clear on what I require to make things run. The following is my routes.js: // MVC routes can be mapped…
HedgepigMatt
  • 190
  • 3
  • 16
0
votes
1 answer

Accessing express.js's connect

I am using Locomotive, and am wondering whether there is a way to access the connect that belongs to the express object somehow. Right now I am loading connect via require, and had to npm install --save connect first to make that happen. How can I…
Dmitry Minkovsky
  • 36,185
  • 26
  • 116
  • 160
0
votes
1 answer

Locomotivejs Check MongoDB connection before all actions

I want to check MongoDB connection and reconnect to it if it's not in "connected" state, before any query is made to it from withing a LocomotiveJS server. A possible way is to add have it in the before filters. Is there any way to define a before…
Zebra Propulsion Lab
  • 1,736
  • 1
  • 17
  • 28
0
votes
2 answers

NodeJS Mysql Stop Server Crash on Error

I am using https://github.com/felixge/node-mysql and everytime a mysql query throw an error, for example if a row does not exist. The node server crashes. connection.connect(); connection.query('SELECT * from table1 where id = 2', function(err,…
h00j
  • 308
  • 1
  • 7
  • 18
0
votes
1 answer

How to start an appfog locomotive.js app?

I'm using the node framework locomotive.js on an appfog instance. Installing this caused a slew of errors and I couldn't get the app to start. Reviewing the help materials and working with appfog support we were able to resolve that the issue had…
Crispen Smith
  • 513
  • 4
  • 20
0
votes
1 answer

Mongoose Won't Add Document

I am trying to get entries added to mongo db from heroku scheduler. But currently I am just testing using "node app/bin/trackStats" Here is my model. var mongoose = require('mongoose'); var Schema = mongoose.Schema; var StatsSchema = new Schema({ …
h00j
  • 308
  • 1
  • 7
  • 18
0
votes
1 answer

MongooseJS Find Max, Min and Avg Number

I have a MongoDB database containing a series of values including a Number field, I wish to get the maximum number, minimum and average. How is the best way to do this using mongoosejs and nodejs?
h00j
  • 308
  • 1
  • 7
  • 18
0
votes
1 answer

PassportJS NodeJS Display Error Messages on page

I am using Locomotivejs and passportJS for auth on a project, and I found some code online to handle register: AccountController.create = function() { var account = new Account(); console.log("test"); account.email = this.param('email'); …
h00j
  • 308
  • 1
  • 7
  • 18
0
votes
1 answer

How to use literal expressions under templates in locomotivejs?

I have the following template: