26 Mar
2012

Railway v0.2.13 released

  • Added db-tools and seedjs
  • Removing validations before loading models
  • Models not running in sandbox, just a regular require, publish method deprecated, use module.exports instead
  • Removed import and export methods from controller scope
  • IMPORTANT jugglingdb dependency removed from railway, add it to your project when it's necessary
  • Added filter names uniquenes checking, issue #136
  • Added support for coffeescript format for locales, thanks to David Butler
  • Add support for file uploads to form helper, via David Butler
  • New helper csrf_tag to create the hidden input tag, thabks to fsateler
  • Changes to routing (fixed behavior of as option), now it affects helper names too, via fsateler
12 Feb
2012

Deploy with roco

Capistrano was great solution for deployment, but it's no longer needed since I moved to roco for all my nodejs projects. It allows me to keep my projects clean, deploy new application in minutes.

View post
20 Oct
2011

Async hell

I want to share two pieces of code which are dead simple, but very useful in asynchronous coding. First one is async iterator, and the second - scheduler.

View post
13 Oct
2011

Optional arguments: make it readable

I hate to read and write code of functions which accepts variable set of arguments, it looks awful! But it can be nice, let's take a look how to unlock this achievement.

View post
7 Oct
2011

JugglingDB

Tired with re-implementing missing functionality on different ORM? Want to learn only one common interface for any database access? But still want to have full power of different ORM's to be closer to different database natures? If you answered yes - you shall use JugglingDB.

View post
2 Sep
2011

Node modules

NodeJS modules ordered by GitHub rating (forks/watchers): modules.node-js.ru

View post
6 Jun
2011

RailwayJS up and running on Heroku

Heroku nodejs hosting is available now. You can deploy your railwayjs application as simple as git push. Want to start with Heroku and RailwayJS? Just follow up instructions in the post.

View post
3 Jun
2011

Joining js/css files into one with two lines of code

Just pushed useful feature to RailwayJS: allow to merge javascripts and stylesheets files into one file. This feature is suitable for production environment to optimize page loading process. Ideally page should have only two additional requests to server: one for javascript and one for stylesheet.

View post
20 May
2011

RailwayJS project

Meet RailwayJS project. My holiday project express-on-railway grew up in the MVC framework RailwayJS. Contributors are welcome. Here is the google group for discussions: groups.google.com/group/railwayjs

View post
4 Mar
2011

Test express app using cucumis

While working on stable release of Express-On-Railway I found great tool for high-level testing of web application: cucumis (it like cucumber, yes). It uses Gherkin parser from kyuri and allows to write async tests in plain english language. I have added jsdom and jquery to them, this mixture allows to test app without heavy things like selenium, capybara, etc..

In this post I will describe some cucumis basics and example of using inside express-on-railway.

View post
24 Jan
2011

Control context using runInNewContext

How to run some script in the sandbox isolation? How to provide a convenient and transparent programming interface and at the same time to protect scipt from changes in the global scope? There is an excellent tool in node.js for this: Script.runInNewContext.

View post
14 Jan
2011

Capistrano deploy script for Node.js app

Capistrano is the best deployment solution ever. Even for Node.js applications. Let's take a look how to deploy the node app to multiple stages: production and staging. Other ingredients of this article: upstart, nginx, git.

View post
11 Jan
2011

Express on railway

I would like to present the result of my Christmas holidays work: super-tiny addon for Express framework, that adds some features from Ruby-On-Rails: controllers, helpers, routes, generators. Now it's on beta stage, but it is better than nothing. So, let's roll on!

View post
28 Dec
2010

BDD in nodejs: vows + sinon

Recently I tried to use for testing a bunch of VowsJS + Sinon.JS. The result exceeded my expectations, I want to tell you briefly about it.

View post
25 Dec
2010

Using global object for writing spec_helper for nodeunit

Global variables is evil, but sometimes we should use it to write more simplier code. For example, we can define some helper functions for code testing, and our test will become more readable. Let's try to do it.

View post
24 Dec
2010

TDD: async testing with nodeunit

NodeJS - is full power async js. It means that the test for the code should be asynchronous too. From all libraries for testing javascript code best meets the requirements of asynchrony is nodeunit library. Also nodeunit is pretty simple to use.

View post
22 Dec
2010

Publish own npm package in few minutes

I just released first version of my package redis-node-mapper and very surprised how easy to publish package to npm registry. It takes only 5 minutes from beginning to end. Only few commands needed.

View post
18 Dec
2010

Setup node shell script for Ubuntu

Sometimes to prepare new VPS to work with node.js we may run exactly one command in linux console:

wget -O - http://1602.github.com/sh/install_node.sh | sh

This is small shell-script that will install node.js + redis + npm + packages. Tested on Debian 5, Ubuntu 10.10. There have been issues with upstart in Debian that is not critical, so you can live without upstart.

View post