3.6.4 • Published 2 years ago
@alterior/platform-nodejs v3.6.4
@alterior/platform-nodejs
Simplifies idiomatic setup of a Node.js environment for running Alterior applications.
Important note
You must still ensure you enable experimentalDecorators and emitDecoratorMetadata in your tsconfig.json to properly run Alterior applications.
Usage
Within your entry point (usually main.ts):
import '@alterior/platform-nodejs'; // must be first!
import { Application } from '@alterior/runtime';
// other imports here...
Application.bootstrap(MyModule);Important: Make sure import '@alterior/platform-nodejs'; is the first line in your entrypoint (main.ts).
What does it do?
This does a number of things for you:
- Loads
zone.jsas early as possible to ensure all code properly runs within the root Zone. - Loads
reflect-metadataas early as possible to ensure all subsequently loaded code has Typescript reflection metadata emitted - Loads
source-map-support/registeras early as possible to ensure any stack traces are shown using the available source maps (this avoids seeing compiled JS files in stack traces, instead showing the original source file locations). - Loads
dotenv/configas early as possible to ensure that anydotenvfiles are properly accounted for withinprocess.env. - Makes
fetch()available globally (when not already provided). Does this withglobalThis.fetch = require('node-fetch') - Makes
WebSocketavailable globally (when not already provided)
3.6.4
2 years ago
3.6.0
2 years ago
3.4.2
2 years ago
3.1.4
3 years ago
3.0.5
3 years ago
3.0.2
3 years ago
3.0.0-rc.7
4 years ago
3.0.0-rc.6
4 years ago
3.0.0-rc.2
4 years ago
3.0.0-rc.1
4 years ago
3.0.0-rc.0
4 years ago
3.0.0-rc.3
4 years ago
3.0.0-beta.100
4 years ago
3.0.0-beta.79
5 years ago
3.0.0-beta.78
5 years ago
3.0.0-beta.75
5 years ago
3.0.0-beta.72
6 years ago
3.0.0-beta.71
6 years ago
3.0.0-beta.69
6 years ago