Is angular-cli browser application required for universal application production or only development?

3 views
Skip to first unread message

Liam Fielding

unread,
Dec 23, 2018, 1:43:44 AM12/23/18
to Angular and AngularJS discussion
From my understanding of angular universal, most of the articles covering it (even when searching for a bare bones implementation) shows them building a browser application and a server application.

Does the server application serve the built browser application and a universal module too? Why are all of the examples so verbose and inflexible?

The reason I ask is because I was looking to split the server from the application directory because to me they are separate concerns but I am struggling to achieve a structure that looks like best practise by following available documentation and advice.

Thank you for reading.

Sander Elias

unread,
Dec 26, 2018, 11:40:55 PM12/26/18
to Angular and AngularJS discussion
Hi Liam,


I think your question is: Do I need the CLI to serve my universal app?
Did I get that right? The answer to that question is no. The CLI is a development tool, not meant for serving anything.

However, you do need a server that can render the universal part. The samples show a NodeJS express server sample. There are others available, My friend Maciej, wrote a couple of nice schematics to help you there too. Those are more geared towards "serverless". Also, the Firebase team has something that enables you to use their service to host a serverless app.

What server/language are you looking for?
Regards
Sander
Reply all
Reply to author
Forward
0 new messages