component / model

Minimalistic extensible data models
122 stars 40 forks source link

root url / subdomain support #16

Closed matthewmueller closed 11 years ago

matthewmueller commented 11 years ago

It'd be nice to expose something that allows you to modify the root url so you can point to subdomains:

user.save() => POST http://api.example.com/user

tj commented 11 years ago

Try altering User.base that'll default to /user, User.base = '/api/user' etc, though it would be nice to have an api for this at the model level so you can specify a prefix once