Skip to content

Commit

Permalink
Merge pull request #7 from abeforgit/feat/support-ember-data-4.12-and-up
Browse files Browse the repository at this point in the history
feat(config): add support for ember-data >=4.12
  • Loading branch information
erikap authored Nov 3, 2023
2 parents daba5b6 + d665ab4 commit d7bb770
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@ let fastbootAppServer = new FastbootAppServer({
gzip: true,
log: true,
buildSandboxGlobals(defaultGlobals) {
return Object.assign(
{},
defaultGlobals,
{BACKEND_URL: "http://backend"}
);
return Object.assign({}, defaultGlobals, {
AbortController,
ReadableStream:
typeof ReadableStream !== "undefined"
? ReadableStream
: require("node:stream/web").ReadableStream,
WritableStream:
typeof WritableStream !== "undefined"
? WritableStream
: require("node:stream/web").WritableStream,
TransformStream:
typeof TransformStream !== "undefined"
? TransformStream
: require("node:stream/web").TransformStream,
Headers: typeof Headers !== "undefined" ? Headers : undefined,
BACKEND_URL: "http://backend",
});
},
});

Expand Down

0 comments on commit d7bb770

Please sign in to comment.