Migration from tomcat to wildfly - wildfly-10

I am migrating my web application from tomcat to wildfly. I was able to deploy the app using a temporary workaround of placing the configurations inside the WEB-INF/web.xml (). But I wanted it outside my war file. Is there any equivalent for catalina/conf/localhost/myapplicationconfig.xml in wildfly. Any suggestions please. I tried naming subsytem configuration and also placing it in modules but it didn't work for me

Related

Developping an angularJS app using a tomcat server

Hi stackoverflow community,
I'm on a project that imposes developping a web app with these technologies:
AngularJs app calling the back-end (the back-end API already existing)
this app will be hosted on Tomcat, with maven as a build tool.
Now I installed eclipse, configured maven and tomcat on it, and i want to start with my first html page. The problem is that I can't find how to deploy an html page (as a start) with these technologies without using a servlet.
I want to generate a war file using maven that would be deployed in tomcat server without defining servlets in web.xml.
All i can find on the internet is how to manually deploy angularJs apps on tomcat.
I found this github project that might be very useful, I'll try to follow the same project structure.

Where to install Angular on Apache?

First of all, my question is not about how to install angular. I'm just getting started with this framework and already got a question right at the beginning.
Usually I create new web projects (HTML, PHP...) in the default web folder of the apache webserver (/var/www/). I did this with angular too under /var/www/firstAngularProject, but it seems the application itself is only accessible on its default port on the webserver root. In my case this is localhost:4200
When I try to open the path in my browser localhost/firstAngularProject I see the index structure and I think this could become a security issue.
So my question is where should I install the angular project or what is the usual way to install it?
When you run Angular using the cli command ng start (which I assume, based on you describing using localhost:4200) you're running the application using webpack-dev-server. This is undesirable since it's only meant for use during development, not for production.
In production Angular works just like any other frontend framework. You build the application with ng build --prod which produces a number of build artifact (in the /dist folder). These artifact are simply static files you make available through some webserver, in your case Apache, by copying the content of the /dist folder to /var/www (or whichever is your default web folder) and that's about it.

How can I deploy my angular 2 app on tomcat or jboss?

I have built a basic angular 2 app. However I need to deploy it on Jboss or Tomcat as I need to use it along with my Java EE application.
Thanks for your help.
You would use a bundler such as angular-cli or webpack to create the production bundle which is then served by the HTTP server. The bundler creates all required file that go into the htdocs directory. Normally Angular apps are completely decoupled from your backend server so there shouldn't be any JBoss or Tomcat specifics.
The Angular team are going to increasingly focus on angular-cli as the premier bundling solution so it might be a good idea to start there.
If you are using angular-cli you can use ng build command. It creates all static files for deploy Angular2 app into the dist folder. You must copy and paste them in webresources folder of your Web Application (WAR). At the moment I am looking for how to deploy this files easier.

.config vs. .env files in node.js w/ heroku

I'm in the process of doing my first deployment of a node.js app on Heroku. While running the app locally I stored API keys and other configuration variables in .config files excluded from version control.
Heroku seems to have built-in support for a ".env" configuration file in the project root and I've refactored my server code to support this. My question is where is the best place to store configuration variables that need to be accessible in the client? I'm running angularjs on the front-end and need to be able to access various API keys.
Is there some way I can reference the same .env file or should I be approaching this differently?

Pycharm Run server error no app.yaml file at '.' for google app engine project

I'm pretty new with Pycharm and since this morning i have tried different configuration to use the Run command with an existing Google app engine project but without success.
I have a pretty clear error :)
google.appengine.tools.devappserver2.errors.AppConfigNotFoundError: no app.yaml file at '.'
Nothing wrong with that because the existing project use a custom file call app_dev.yaml. So it's normal that Pycharm is unable to load the server.
How can i change this behaviour and tell Pycharm to use app_dev.yaml instead of app.yaml?
Is it possible?
Thanks
I input an app.yaml on root directory and reloading my project, this working for me.
While the PY-9714 issue was, indeed, closed without a resolution, the automatic '.' added to the Run configuration has been reconsidered in PY-10675 in light of GAE support for multiple modules/services inside the same application and/or request routing using a dispatch.yaml file.
So in the more recent PyCharm versions it's possible to specify one or more .yaml files as options in the Run configuration. See for an example Pycharm multiple modules Run server
For those still running an older Pycharm version without the fix, a solution using a wrapper script is described in Run App Engine development server with modules in PyCharm

Resources