Universal: Hard for newbee to set up starter environment according to README.md

Created on 20 Sep 2016  路  9Comments  路  Source: angular/universal

Hi all, I'm new to angular-universal, I meet lots of questions when I tried to set up ng-universal starter environment according to README.md. I spent a lot of time but I still did not set up the sever, and I don't why.
I think the README.md is too old to follow. Could you please update the README.md or give more detail info about starter environment, so that I can show my boss how awesome angular-universal is and generalize angular2 in our project.
Angular2 have manay amazing features. And wish angular2 and angular-universal a bright feature.

Most helpful comment

Hey guys documentation and things like that are definitely top of the priority list! There will be more definitive information out there hopefully very soon to fill in some of the gaps people might be experiencing.

If you check out the newly updated Documentation, it'll help understand some of the core concepts that come with writing Angular2 in a Universal way.

As for webpack/system, the angular websites tutorials and such use System primarily because things like Plunkr do, so it helps make things easier for demostration/learning purposes. But if you look at the Angular CLI for example, it's changed to webpack completely. Trust me, just switch to Webpack and never look back you won't regret it :)

What are you some other things you guys would like to see better documented?

All 9 comments

You're right, it is not easy.
The universal-starter is not documented as well and uses webpack while the official angular2 documentation is based on systemjs.
It produces a very big bundle (soon it will be fixed by using ngc), but I'd like to leverage http2 and use separate modules and lazy loading.
The "best practice" section is not enough and so many questions still linger on my mind.
For istance, I'm still wondering if to keep separate process for universal and for backend api, since to deal with typescript with libs that don't provide typings is super annoying.
Anyway I bet documentations and examples will arrive soon, after all universal is still under development.

Hey guys documentation and things like that are definitely top of the priority list! There will be more definitive information out there hopefully very soon to fill in some of the gaps people might be experiencing.

If you check out the newly updated Documentation, it'll help understand some of the core concepts that come with writing Angular2 in a Universal way.

As for webpack/system, the angular websites tutorials and such use System primarily because things like Plunkr do, so it helps make things easier for demostration/learning purposes. But if you look at the Angular CLI for example, it's changed to webpack completely. Trust me, just switch to Webpack and never look back you won't regret it :)

What are you some other things you guys would like to see better documented?

I noticed that angular-cli totally switched to webpack, at this point I think it would be useful and consistent to use webpack even in the official angular2 documentation.
Is webpack really superior? I've read in the past about the fact that systemjs would have been the future but maybe not so ripe yet.
I am about to convert a big project from angular1 to 2 even becouse universal, the current server is written in php, the effort of rewriting it in node will be huge.
Your documentation is based on Express, but they don't update it from a while and it seems the main developer started koa.
Since I've to start from scratch my code, I'd like to use something based on the last available technology, well supported and with a long life, but obviously if you support just express it could influence developers's choise, so it would be nice to know about what you guys plan to support.

Yeah I've talked to a few of the guys who work on the documentation, and maybe someone else here knows more, but it seems like for now they're sticking with System in the website documentation mainly because of that whole Plunkr situation, but I'm hoping that changes in the near future!

Some of the advantage webpack2 (upcoming) features like tree-shaking and advanced code-splitting make it unbelievably powerful. At the end of the day though it's just a build tool so either way that part is a little separate from Angular itself. Just start playing with the CLI to get comfortable with everything! Soon we'll have a Universal plugin for that as well. Johannes is working on that currently.

Well right now we have built-up asp.NET Core integration and the current demo here is with Express (mainly because it's the most popular). But integrating into Koa and others is very similar. We plan on documenting further how exactly it works with other Node frameworks (it's nothing crazy!), the client-side aspect is exactly the same too, which is great. But basically instead of using the express-engine, we could either make a koa-engine or you could manually serialize it yourself, it's just a few lines of code :)

As for other frameworks/languages, there are _eventual_ plans to integrate with PHP, Go, Java as well. But like I was saying, for those languages, it's not much more than spinning up a Node server and calling our universal platforms serializer. (This is what the .NET Core integration is doing) You won't have to rewrite your code to Node, don't worry! We just need to create an integration for PHP so that you can manually fire off the platform serializer.

Thank you for all those clarifications!
While I keep focusing on my app logic, I will keep an eye on universal, hoping the day I will put it in production, I don't have to change too much code(and struggle) to implement universal, ngc, tree-shake and so on :)

@bogomips was mentioning the possibility to lazy laod modules within an ng2-application. Is this also possible within an universal application?

@crebuch For what I've understood It is indipendent, so I guess yes

Hey, so I am totally sympathetic to this issue. We have a large amount of documentation that will address this in the near future. Follow #394 for the progress on this. I want to focus our efforts on making it easy to push out docs through this change and then you will start seeing a lot more helpful info. In the meantime, if you have any specific issue or question feel free to post an issue in GitHub or talk to us on slack or on gitter.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daright picture daright  路  6Comments

babarinde picture babarinde  路  5Comments

MrCroft picture MrCroft  路  3Comments

moczix picture moczix  路  5Comments

PatrickJS picture PatrickJS  路  5Comments