Setup with Backbone.js

Skip to first unread message

Michael McLaughlin

Jun 17, 2014, 2:11:04 PM6/17/14
hey all, so I'm following along with this tutorial:
but I'm running into a bit of an error when I try the same thing in a serve project. I would really like to use serve, but at the same time, it might not be worth, since the views are being generated by the js models anyway...
I have this file located in the root of the serve project, called users (if you watch the video, it's at about 20 mins) and I'm trying to get the content (models) from it to backbone. I keep running into this error though: 

  1. OPTIONS localhost:4000/users net::ERR_UNKNOWN_URL_SCHEME jquery-1.10.2.min.js:6
    1. Backbone.View.extend.render(index):54
    2. (anonymous function)(index):74
    3. Backbone.Events.triggerbackbone-1.1.2.min.js:148
    4. (anonymous function)backbone-1.1.2.min.js:1255
    5. (anonymous function)backbone-1.1.2.min.js:1481
    6. (anonymous function)

  2. just wondering if anyone knows why this might be happening.

it's happening when I try to access the file with the model in it:

$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
options.url = 'localhost:4000' + options.url;

var Users = Backbone.Collection.extend({
url: '/users'

var UserList = Backbone.View.extend({
el: '.page',
render: function(){
var that = this;
var users = new Users();
success: function(users){
var template = _.template($('#user-list-template').html(), {users: users.models});

John W. Long

Jun 17, 2014, 2:14:44 PM6/17/14

options.url = ‘http://localhost:4000' + options.url;


Serve Users Group
Mailing List:

You received this message because you are subscribed to the Google Groups "Serve Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Reply all
Reply to author
0 new messages