Skip to content

Instantly share code, notes, and snippets.

@kristianmandrup
kristianmandrup / app.js
Last active December 27, 2015 11:09
An attempt to refactor the racer-example by @Sebmaster to make for a more scalable example code that can be more easily be extended to include more models and should also make the code easier to understand. This example is partly inspired by the todos example that comes with racer. See https://github.com/codeparty/racer/tree/master/examples/todos
# refactoring of https://github.com/Sebmaster/racer-example/blob/master/app.js
var racer = require('racer');
var express = require('express');
var app = express();
var http = require('http');
var server = http.createServer(app);
var store = racer.createStore({
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//