mantis-app
Version:
M.A.N.T.I.S (MongoDB, Analog, Nx, Tailwind CSS, Ionic, Storybook) is not just a CLI tool; it's your passport to a seamless full-stack project launch.
24 lines (18 loc) • 632 B
text/typescript
import 'zone.js/node';
import '@angular/platform-server/init';
import { enableProdMode } from '@angular/core';
import { renderApplication } from '@angular/platform-server';
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { config } from './app/app.config.server';
if (import.meta.env.PROD) {
enableProdMode();
}
const bootstrap = () => bootstrapApplication(AppComponent, config);
export default async function render(url: string, document: string) {
const html = await renderApplication(bootstrap, {
document,
url,
});
return html;
}