I’m currently learning angular2 (and typescript) in order to write a web front-end for the requirements tracking tool I am developing.
What I would like to do is:
- write the web application in angular2
- compile the web-app into a single html/js/etc file – all contained in a single file. Angular2 is supposed to be good at this from my understanding (single page application)
- bundle this single file into my rust-app’s binary and have a way for the rust-app to specify the url that the rust backend will be running on (maybe simply formatting a string?)
- use a rust web-framework to simply serve this html file – there should be no dependencies on node.js or anything else
- write the rust backend as a json-rpc server that the angular2 app will connect with.
When I was looking for examples of this, I found rustsite-example, but it requires you to have node and npm installed. I do not want to have to require my users to install those dependencies (developers will obviously have to install those dependencies).
Any help would be appreciated, even if it is someone just telling me that this is or isn’t possible.