ganatan / angular-ssr Goto Github PK
View Code? Open in Web Editor NEWAngular 17 Example SSR (Server Side Rendering)
Angular 17 Example SSR (Server Side Rendering)
What is the best way to deploy the Angular SSR app on production using Docker?
Hi,
Firstly, I am a big fan of what you do here ๐
Do you think about adding i18n support?
I'm particularly interested in multiple languages using prerendering, maybe using different routes like
hostname.com/lang
I might implement it as described here, tell me if you're interested in a PR.
Merci!
Hi, excellent work on this project.
I wanted to ask you, why you call this a server-side rendered example if the app-root tag is empty when we do View Source on the right click of the page here: https://angular.ganatan.com/ ?
As far as I get it right, SSR means pre-renderring some data on server-side in html source, in between the app-root tag. So that when search engine crawlers get the raw HTML of the page they see some data instantly on a specific web app route.
In React world, for example, the SSR framework called NextJS actually does the job of delivering to browser on specific routes the HTML pages source with some data in it, so there is no empty root tag as in your example.
Cheers
@ganatan
is there any solution you provided for flickering issue?
Hello,
I copied your project with "git clone" and ran the command "npm run build: ssr && npm run serve: ssr". "localhost: 4000" works without problems. Then I uploaded the files to my Plesk panel. I have defined "server / main.js" for the Node.js application launch file. But it doesn't work.
The same problem exists in my own project. Angular 8 version of my own project runs on the server. But it doesn't work on the server when it updates to Angular 9.
Angular 8 created "server.js" in "dist" folder in "ssr build" operation. I was selecting "server.js" as the Node.js application launch file in the Plesk panel. But now "server.js" does not exist. I wonder how you create files when you build them. Could you help?
Thanks in advance.
you need server.ts to be rendered in build file. there is no script for this.
Can you provide a instruction how to deploy your example to Azure App Service. It is really problem.
After deploy to IIS , get following error:
iisnode encountered an error when processing the request.
HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error
You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.
In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.
The node.exe process has not written any information to stderr or iisnode was unable to capture this information. Frequent reason is that the iisnode module is unable to create a log file to capture stdout and stderr output from node.exe. Please check that the identity of the IIS application pool running the node.js application has read and write access permissions to the directory on the server where the node.js application is located. Alternatively you can disable logging by setting system.webServer/iisnode/@loggingEnabled element of web.config to 'false'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.