Deploy the Angular app in Wildfly

I made an AngularJs application that just uses my REST api server (built in java and deployed to Wildfly).

I made my servers accessible from the Internet using my public IP address (through port forwarding).

My question is how can I make an Angular application accessible as well as from the Internet using my public IP address. Can I also deploy it to Wildfly? How to do it?

+4
source share
3 answers

You can package the angular application in the same application as your REST API.

, REST api .war, anglar (html-, js-...) WAR, REST WEB-INF/lib, JAR.

. WAR .

, REST api, URI , URL ( webapp), angular -, REST api.

, , angular: ( REST API "rs" $http angular)

$http.get('rs/icecreams?flavoor=strawberry')
+3

WAR/EAR, standalone.xml:

<server name="default-server">
    <http-listener name="default" socket-binding="http"/>
    <host name="default-host" alias="localhost">
        <location name="/" handler="welcome-content"/>
        <location name="/yourapp" handler="static"/>
    </host>
</server>
<handlers>
    <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
    <file name="static" path="/var/yourapp" directory-listing="true"/>
</handlers>
+3

angular2 whith route, . :

0

Source: https://habr.com/ru/post/1621101/


All Articles