Skip to content

Instantly share code, notes, and snippets.

@eelayoubi
eelayoubi / web-performance.md
Created December 26, 2018 10:24 — forked from stevekinney/web-performance.md
Web Performance Workshop

Web Performance

Requirements

Repositories

const path = require('path')
const serverless = require('serverless-http');
const minify = require('html-minifier').minify;
const { app } = require("./dist/angular-lambda-ssr/serverless/main");
const handle = serverless(app, {
provider: 'aws',
type: 'lambda-edge-origin-request'
@eelayoubi
eelayoubi / serverless.ts
Last active December 13, 2020 21:45
Angular Lambda SSR
import 'zone.js/dist/zone-node';
import { join } from 'path';
import * as fs from 'fs';
import { renderModule, AppServerModule } from './src/main.server';
import * as express from 'express';
export const app = express();
const distFolder = join(process.cwd(), 'dist/angular-lambda-ssr/browser');