MCPcopy Index your code
hub / github.com/angular/angular / createServerPlatform

Function createServerPlatform

packages/platform-server/src/utils.ts:55–74  ·  view source on GitHub ↗

* Creates an instance of a server platform (with or without JIT compiler support * depending on the `ngJitMode` global const value), using provided options.

(options: PlatformOptions)

Source from the content-addressed store, hash-verified

53 * depending on the `ngJitMode` global const value), using provided options.
54 */
55function createServerPlatform(options: PlatformOptions): PlatformRef {
56 const extraProviders = options.platformProviders ?? [];
57 const measuringLabel = 'createServerPlatform';
58 startMeasuring(measuringLabel);
59 const {document, url} = options;
60
61 const platform = platformServer([
62 {
63 provide: INITIAL_CONFIG,
64 useValue: {
65 document,
66 url,
67 },
68 },
69 extraProviders,
70 ]);
71
72 stopMeasuring(measuringLabel);
73 return platform;
74}
75
76/**
77 * Finds and returns inlined event dispatch script if it exists.

Callers 2

renderModuleFunction · 0.85
renderApplicationFunction · 0.85

Calls 3

platformServerFunction · 0.90
startMeasuringFunction · 0.85
stopMeasuringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…