Questions tagged [railway.js]

Railway.JS(now known as CompoundJS) - MVC framework. Create NodeJS web apps faster with more energy, using RailwayJS.

RailwayJS (now known as CompoundJS) is the Node.JS MVC framework based on ExpressJS, fully ExpressJS-compatible. It allows you to build web applications in a similar manner as in Ruby On Rails.

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

Some of the features of RailwayJS are:

  • Full MVC+H stack
  • Resource-based routing
  • JugglingDB ORM
  • Multi-locale support
  • Coffee-script support (howto)
  • Generators for model, controller, scaffold
  • Testing: nodeunit, cucumis, code coverage reporting
  • Debugging: railway console
  • Extensions
61 questions
0
votes
1 answer

Compound/Express JS: Multiple sessions per user

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…
incutonez
  • 3,241
  • 9
  • 43
  • 92
0
votes
1 answer

CompoundJS: Create model from external REST API

I've got an external RESTful endpoint that I'm trying to build a model off of in my CompoundJS app. I'm a bit confused about a couple of things: How do I build a model off of an external RESTful API (most models seem to be database…
incutonez
  • 3,241
  • 9
  • 43
  • 92
0
votes
1 answer

Working with compound js on windows. Cannot start anything

I wish to create a hello world application using compound.js. So far, nothing works at all. I've installed "npm install compound -g" to have compound be available globally. Now I wish to run "compound init" and I get this: (see first code…
Lev Dubinets
  • 788
  • 10
  • 32
0
votes
1 answer

Validation in Railway.js on module object

am new to Railway.js (one of those cases where someone else wrote this peace of software that I now need to update - great grr!) I got a "Notification" model and want to add validation that if user don't provide a field from the UI I display a…
Lennie
  • 1,999
  • 4
  • 27
  • 42
0
votes
3 answers

Cannot get async javascript to work

I'm using node.js, RailwayJS and JugglingDB. I have a model: Model.afterInitialize = function() { var me = this; Sequence.getSequence('forModel', function(sequence) { me.serialId = sequence; }); me.title = 'Hello'; } Once it's all done…
Simon
  • 5,158
  • 8
  • 43
  • 65
0
votes
1 answer

NodeJS: Debugging RailwayJs with node-inspector

Currently i'm working on an NodeJS app building over RailwayJS framework. I would like to have a node-inspector kind of debugger for step-by-step debugging of RailwayJS app. Can anyone suggest me how to use node-inspector(or any similar debugger)…
0
votes
1 answer

Make a variable available in application scope in railway js

I'm using railwayjs for my new project, which uses passport framework for authentication. In the environment.js file, i'm requireing and configuring the passport details. I've a controller auth which does the login. So inside an action in auth…
shahalpk
  • 3,383
  • 7
  • 36
  • 55
0
votes
1 answer

Render partial in railway.js

I'm very new to node.js and I'm using the railway.js framework to learn MVC at the sametime. We use C# at work. I'm a front-end Dev.. I can't seem to figure out or see any documentation on how to render a partial view in railway properly. Any help…
0
votes
1 answer

railway.js node website on azure returns error and doesn't log

I'm getting an iisnode error 500 when trying to run a railway.js node application on azure. Unfortunately there is nothing in the log files in LogFiles/nodejs nor in wwwroot/server.js.logs Here is the response iisnode encountered an error when…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
0
votes
2 answers

Updating DB Fields in RailwayJS upon Create and Update

I'm new to RailwayJS (but not Rails) and I had a question about the best way to save my created_at field on Create, and updated_at field on Update. This is my model (db/schema.js): var Post = define('Post', function() { property('title',…
User 1058612
  • 3,739
  • 1
  • 27
  • 33
0
votes
2 answers

Node.js Railway with sass/stylus/less

i started using railway (a node.js mvc framework) and i want to use sass/less/stylus as a css render engin. i couldn't find how to configure that in railway. railway uses express.js so i guess i can install it via that. i already installed stylus…
Sagiv Ofek
  • 25,190
  • 8
  • 60
  • 55
0
votes
1 answer

ExpressJS Get resulting source from view instead of rendering it

I'm intending to use some ejs templates to generate HTML for sending out emails. I'd like to pass in a model to my view, and get back the resulting HTML So, instead of render() - i want to 'get' the html into a variable before it's passed back to…
Alex
  • 37,502
  • 51
  • 204
  • 332
0
votes
1 answer

ENOENT error using nodejs on heroku

I'm getting an ENOENT error on my heroku app, preventing it from starting up: Error: ENOENT, open '/app/log/production.log' This file / dir (app/log) does exist however... So I'm not sure what's going on?
Alex
  • 37,502
  • 51
  • 204
  • 332
0
votes
1 answer

Defining connection string for mongoose in environments

I've got a fairly "typical" setup (I'm using RailwayJS) schema: customSchema(function(){ // Initialize Mongo DB var mongoose = require('mongoose'), Schema = mongoose.Schema; mongoose.connect('mongodb://localhost/mydb');…
Alex
  • 37,502
  • 51
  • 204
  • 332
0
votes
1 answer

req.body returning "Forbidden"

In my node.js express app I'm submitting a form, to an action on a controller. All this controller does is: send(req.body) (I'm using RailwayJS (but that's not all that important to this question I don't think) I'm doing this is to get the values…
Alex
  • 37,502
  • 51
  • 204
  • 332