Skip to content

fizerkhan/backbone-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backbone-server

Implements an in-memory server for Backbone.js http://documentcloud.github.com/backbone/#Sync

This project is a teaching aid. It provides an out-of-the-box server that Backbone.js models can sync with.

It uses the CORS headers to allow cross-origin requests.

Usage

  1. Clone the repository

  2. Install node.js

  3. Install the dependencies with npm install

  4. Start the server with node rasterver.js

  5. Configure your models / collections with urls in the form http://localhost:8080/[collectionname]

Extras

I added following features apart from original Backbone server.

  • Instead of having empty data, I added sample data javascript file(data.js) with sample collection. You can place your own collection in the file.
  • Removed idCounter field. The id is created based on the collection length.
  • Updated port number from 3002 to 8080.

P.S.

For truly zero-config usage I run a hosted instance of backbone-server at http://withouttheloop.com:8080. Set your model's url to http://withouttheloop.com:8080/[some unique collection id] and it will work magically. I do occassionally restart the service so not recommended for production. ;)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%