-
Notifications
You must be signed in to change notification settings - Fork 0
cklist ember deploy
EricLScace edited this page Jul 18, 2017
·
3 revisions
- Run
npm installto verify all dependencies are up-to-date. - Run
bower installto verify all dependencies are up-to-date. - Use project find to verify all names were consistently changed from the template name (e.g.,
ember-template) to the name of the client. - Set client to point to server as follows:
- Update config/environment.js to insert name of client
- Make sure the
apiHost: 'http://localhost:3000/',is present.
module.exports = function(environment) { // next line must be 'var ENV =...' var ENV = { modulePrefix: '<% NAME OF YOUR CLIENT will be here %>', environment: environment, rootURL: '/', locationType: 'auto', apiHost: 'http://localhost:3000/', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true } }, ... ```
- Further down in the same file, define rootURL (Note that rootURL is NOT camelcase. For example, rootUrl will not work.) E.g.,
/allthemats-ember.- Also define apiHost:
if (environment === 'production') {
ENV.rootURL = '/<name-of-git-repo>';
ENV.locationType = 'hash';
ENV.apiHost = '<% replace with the URL to your deployed API %>';
}
> ```
- [ ] Set `adapters/application.js` to import the apiHost link:
```js
import ActiveModelAdapter from 'active-model-adapter';
import ENV from '<%name of client%>/config/environment';
export default ActiveModelAdapter.extend({
host: ENV.apiHost,
...
...
...
});- if there is a
services/ember-ajaxfile:
import AjaxService from 'services/ember-ajax';
import ENV from '<%name of client%>/config/environment';
export default AjaxService.extend({
host: ENV.apiHost,
...
...
...
});- Make sure all work is committed and working on your master branch.
- Create a
gh-pagesbranch locally viagit checkout -b gh-pages. DO NOT PUSH TO GH-PAGES YET - Remove
/distfrom.gitignoreby adding a#before it. - Add and commit this change:
git add dist/. - Run
ember build --environment=production. - Run
git statusandaddall files changed (mainlydist/) and some other changes; then commit all changes. - Use
subtree pushto create a newgh-pagesbranch on GitHub composed only of the dist directory by using:git subtree push --prefix dist origin gh-pages - Go check to your github page site and ensure all requests are working and appear the same as on localhost:4200.