- You need to have the latest version of Node. Preferably, you're using 9.8.0, but the latest LTS should work as well.
- You should have
npxinstalled usingnpm install -g npx. - Install the React Developer Tools.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'); |