Thanks to the continued great work by @Urigo, @darkbasic, @ardatan & others, we have an
angular-meteor application in development that we will soon need to build and deploy for production. Similar to the
angularcli-meteor example project, we have been using Angular CLI for the web client development, so our client has a different build process from the Meteor server. Given recent advancements on the Meteor side for building Angular clients, I suppose we could switch back to using Meteor for both client and server in order to simplify production builds and deployment, but our development process is working fine as-is, so I am reticent to change it without a compelling reason.
Any recommendations or pointers to resources on building and deploying an Angular CLI web client / Meteor server or transitioning such a project to Meteor for both client & server builds?
You can find several examples in the angular-meteor github: https://github.com/Urigo/angular-meteor/tree/master/examples
The AngularCLI example still uses Angular 4 and an older version of Angular-CLI because we encountered several issues with the latest version (most of them had nothing to do with Meteor itself). You can find an updated example here: https://github.com/darkbasic/angularcli-meteor/tree/testing-2
Most of the issues should be solved right now, I’m currently testing if the latest angular-cli update fixes the production build which is currently broken in the testing-2 branch. If it does I’ll update the example in the main repo.
Hope this helps.
Thanks for the fast reply, @darkbasic! The Webpack build configurations in the Angular CLI examples on both of those branches look like they are building the client to the standard
dist/ location. Likewise, we have our Angular 5.0.3
angular-meteor web client building successfully with
ng build. That configuration leaves separate client and server builds for deployment. What’s your recommendation on deploying and hosting such separate builds?
I would deploy the server like any standard Meteor application and the client like any standard angular-cli application. Then put an nginx proxy in front of them to sort requests to the client or to the server depending on the path.
You can see an example in step 17.7: https://github.com/Urigo/Ionic2CLI-Meteor-WhatsApp/blob/master/.tortilla/manuals/views/step17.md