-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ember.js "fastboot" allows us to server-render the app and send HTML over the wire. While this sounds good in theory, using it in practice has shown that it requires significantly more server-side resources and causes a lot of additional complexity. This part of the codebase hasn't been used for years and if we would move to server-side rendering then it probably would be combined with moving to a different framework/architecture. Thus it is time for the fastboot code and complexity to be removed from the codebase.
- Loading branch information
Showing
21 changed files
with
94 additions
and
678 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
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
|
||
export default class IndexRoute extends Route { | ||
@service fastboot; | ||
|
||
setupController(controller) { | ||
if (!controller.hasData) { | ||
let promise = controller.fetchData(); | ||
if (this.fastboot.isFastBoot) { | ||
this.fastboot.deferRendering(promise); | ||
} | ||
controller.fetchData(); | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,9 @@ | ||
import Service, { inject as service } from '@ember/service'; | ||
import Service from '@ember/service'; | ||
|
||
import window from 'ember-window-mock'; | ||
|
||
export default class RedirectorService extends Service { | ||
@service fastboot; | ||
|
||
redirectTo(url) { | ||
if (this.fastboot.isFastBoot) { | ||
let headers = this.fastboot.response.headers; | ||
headers.set('location', url); | ||
this.set('fastboot.response.statusCode', 301); | ||
} else { | ||
window.location = url; | ||
} | ||
window.location = url; | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.