Category : angular-universal

For my website, I currently have two separate projects / repositories: an Angular front-end and an express back-end. I use typescript in both repos. Goal: Implement server side rendering (ssr) with angular universal Issue: Angular Universal defines its own express server in the client/front-end repository export function app(): express.Express { const server = express(); const ..

Read more

The SSR part is working, and it is reachable by localhost:4000, including our stylesheets etc. The package.json’s relevant part is: "dev:ssr": "ng run project:serve-ssr", "serve:ssr": "node dist/project/server/main.js", "build:ssr": "ng build –prod && ng run project:server:production", "prerender": "ng run project:prerender" But the problem is, the served website doesn’t contain our javascript file in the body (eg. ..

Read more

In my application, I fetching HTML data from the API and render, but when I trying to do view the source after building the project I a not able to see that page content in that. angular.json {"$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "Siteuser": { "root": "", "sourceRoot": "src", "projectType": "application", "prefix": "app", ..

Read more

server { listen 5000; listen [::]:5000; server_name localhost; root E:NG9B2CB2CdistB2Cbrowser; http2_max_field_size 64k; http2_max_header_size 512k; location / { proxy_pass http://127.0.0.1:4000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_http_version 1.1; proxy_set_header X-NginX-Proxy true; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_cache_bypass $http_upgrade; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; } location /YTB/api { proxy_pass http://localhost:8073/YTB/api/; proxy_set_header X-Real-IP $remote_addr; ..

Read more