- Start Date: (fill me in with today's date, YYYY-MM-DD)
- RFC PR: (leave this empty)
- Ember Issue: (leave this empty)
Gives Ember developers and addon authors the ability to build an Ember app for targets in addition to the browser.
class Person { | |
/** The person's given name. */ | |
name: string; | |
constructor(name: string) { | |
this.name = name; | |
} | |
async sayHello() { | |
console.log(`Hello, ${this.name}!`); |
v6.9.2 | |
4.0.5 | |
[email protected] /Users/tomdale/Code/glimmer-perf-app | |
├─┬ @glimmer/[email protected] | |
│ ├─┬ @glimmer/[email protected] | |
│ │ ├── @glimmer/[email protected] | |
│ │ ├── @glimmer/[email protected] | |
│ │ ├── @glimmer/[email protected] | |
│ │ └── [email protected] | |
│ ├── @glimmer/[email protected] |
┌───────────────────────────────┬────────┐ | |
│ Function │ Time │ | |
├───────────────────────────────┼────────┤ | |
│ dist/app.js │ 42.731 │ | |
├───────────────────────────────┼────────┤ | |
│ WeakMap │ 0.213 │ | |
├───────────────────────────────┼────────┤ | |
│ populateBuiltins │ 0.19 │ | |
├───────────────────────────────┼────────┤ | |
│ populateBuiltins$1 │ 0.171 │ |
Your input is needed!
Right now, if an app errors out while fufilling a request, the FastBoot server returns a 500 HTTP status code and an error message. This is probably the correct behavior for using FastBoot for pre-rendering content.
However, if you're serving FastBoot pages to the end user, this is problematic. If you happen to have a route that crashes on certain
circumstances, but only on Node—for example, maybe it inadvertently accesses localStorage
—you'd rather serve the app to the user because
#!/usr/bin/env node | |
var AWS = require('aws-sdk'); | |
var RSVP = require('rsvp'); | |
var exec = RSVP.denodeify(require('child_process').exec); | |
var fs = require('fs-promise'); | |
var chalk = require('chalk'); | |
var crypto = require('crypto'); |
WIP, I had to run in the middle of writing this and will flesh it out in more detail later
By default, we sandbox Ember apps running in FastBoot such that they cannot access any built in Node.js features: no file IO, no network, etc.
However, FastBoot apps need to be able to fetch model data over the
network, the same way they do in the browser. Historically, we've
hardcoded the najax
global to be available in the FastBoot context,
Most client-side applications need to fetch data over the network. In the Ember.js ecosystem, many developers use a high-level abstraction, like Ember Data, that standardizes network access via an adapter pattern.
For those who want more low-level control over data fetching, it is
irhydra () { | |
cd ~/irhydra | |
command rm -f *.cfg *.asm | |
command "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary" --no-sandbox \ | |
--js-flags="--trace-hydrogen \ | |
--trace-phase=Z \ | |
--trace-deopt \ | |
--code-comments \ | |
--hydrogen-track-positions \ | |
--redirect-code-traces" |
// before | |
var displayAnnotation = config.displayAnnotation, | |
width = config.width, | |
axisHeight = config.axisHeight, | |
barsLeftMargin = config.barsLeftMargin, | |
barsRightMargin = config.barsRightMargin; | |
// after | |
var { displayAnnotation, |