w20-framework / w20

W20 is a Web framework, built upon a powerful RequireJS/AngularJS/Bootstrap mix to help you develop single page applications.
https://w20-framework.github.io/
Mozilla Public License 2.0
8 stars 9 forks source link

Added alias declaration for api path #32

Closed kavi87 closed 8 years ago

kavi87 commented 8 years ago

Configuration can use aliases for api endpoints

"api": {
    "home": "/rest/",
    "coolApi": "http://www.apidomain.com/api",
    "other": "@home",
    "another": "@coolApi"
}

If @home is given alone

"api": {
    "myApi": "@home",
}

It resolves to document protocol://hostname:port with '/rest/' appended.

Also added some internal refactoring of utility functions.