We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heres my SSR setup:
universal.ts
import { onRequest } from 'firebase-functions/v2/https'; import { render } from '../../render.js'; import express, { Request, Response, NextFunction } from 'express'; import * as server from '../../../dist/stamp-app/server/server.mjs'; export const ssrApp = express() as any; ssrApp.use(express.static('dist/stamp-app/browser')); ssrApp.get('*', async (req: Request, res: Response, next: NextFunction) => { const ssr: any = await render(server, req, res, next); res.send(ssr); }); export const universal = onRequest( { maxInstances: 10, timeoutSeconds: 1200, cpu: 1, memory: '2GiB', region: ['us-central1'] }, ssrApp );
render.js
import { Request, Response, NextFunction } from "express"; export async function configServerApp(app: any, req: Request, res: Response, next: NextFunction) { //configure app here & retrieve HTML let template; if (req.path === '/') { // template = await fetch('@dist/stamp-app/browser/index.csr.html'); next(); } template = `<div>HTML CONTENT FOR SSR APP</div>`; return template; } export async function render(app: any, req: Request, res: Response, next: NextFunction) { const ssrApp = await configServerApp(app, req, res, next); return ssrApp; }
am I missing something..? thanks for any help in advance
The text was updated successfully, but these errors were encountered:
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Heres my SSR setup:
universal.ts
render.js
am I missing something..? thanks for any help in advance
The text was updated successfully, but these errors were encountered: