-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to remove trailing slashes
This adds a new option to the adapter config and supporting tests and documentation. Documentation adds a new "configuring" section with some back-filling for other options that already exist.
- Loading branch information
Dustin Farris
committed
Jan 10, 2015
1 parent
ca9ad7d
commit 135634b
Showing
7 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Configuring | ||
|
||
There are a number of configuration variables you can set in your environment.js file. | ||
|
||
|
||
## API_HOST | ||
|
||
**Default:** `''` | ||
|
||
The fully-qualified host of your API server. | ||
|
||
|
||
## API_NAMESPACE | ||
|
||
**Default:** `'api'` | ||
|
||
The URL prefix (namespace) for your API. In other words, if you set this to my-api/v1, then all | ||
API requests will look like /my-api/v1/users/56/, or similar. | ||
|
||
|
||
## API_ADD_TRAILING_SLASHES | ||
|
||
**Default:** `true` | ||
|
||
Whether to append a trailing slash to API URL endpoints. | ||
|
||
|
||
## Example | ||
|
||
```js | ||
// my-ember-cli-project/config/environment.js | ||
|
||
module.exports = function(environment) { | ||
var ENV = { | ||
APP: { | ||
API_ADD_TRAILING_SLASHES: false | ||
} | ||
}; | ||
|
||
if (environment === 'development') { | ||
ENV.APP.API_HOST = 'http://localhost:8000'; | ||
} | ||
|
||
if (environment === 'production') { | ||
ENV.APP.API_HOST = 'https://api.myproject.com'; | ||
ENV.APP.NAMESPACE = 'v2'; | ||
} | ||
|
||
return ENV; | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters