Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have developed application using angularjs as front-end , spring mvc as back-end and i used node js in between them.
I hosted frontend on appache web server and backend on tomcat?
Is this right way?
I am getting CORs issues in IE browser and page response time is very slow.
Can i run both applications on tomcat?How?
Thanks In advance
Raja
You can host both on the same tomcat server (this is exactly what i'm doing).
The web pages (angularJS app) just need to be a part of your server side artifact.
if you're using spring mvc that means your angular files need to be inside your WebContent folder.
then you can set up your web.xml to direct your visitors to the angular app via a controller call or a link to your index file
for example:
<welcome-file-list>
<welcome-file>/angularapp/index.html</welcome-file>
</welcome-file-list>
hope it helps..
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
What are spring securities need to be implement while creating react js based web application?.
what is the current trend?Kindly reveal me if someone has really experience in this field ,especially from spring boot back end developers.
Since react-js is only a frontend web framework, it can't handle the backend services. In my opinion integrating react-js frontend with spring-boot at the backend will be a great choice for a project but it always depends on what type of application you are building.
Spring boot provides many features for security like Password Hashing, Role based Authentication, Remember-me, HTTP Authorization and many more.
The best part about these features is that they can be configured and customized based on your needs and what suits your application the best
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have a Node JS backend which consists only of API.
I want to develop an Angular dashboard for my system, that communicates through REST API to perform all actions.
I have seen some MEAN examples where the Angular project lives inside the Node JS project, in public folder.
However I was wondering if this is the best approach, or should I create another project that simply connects to the API and that is hosted independently.
My main fear is that Node JS project is deployed in Google Cloud Platform and I have the feeling/understanding that whenever I update something I need to upload a whole new instance of the project (and traffic is redirected to this new instance), so I would lose control of API versions if new updates are being submitted for frontend changes.
No, it doesn't have to be on the same project or hosting, angular 2 or any other single page application framework would work just as fine with any API as long as you apply same origin policies or your API provide the right CORS policy headers.
here is how to enable CORS on express.js if you are planing to have backend on a different domain.
or you can redirect/proxy specific urls to be served from different upstreams or static files using Nginx for example.
You can even have your angular app hosted via a cdn where your api is on any other hosting.
It is even recommended to manage back end and front end in separate developing cycles.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am learning AngularJS and I want to know how to connect to SQL Server, get data from it and show it using AngularJS.
Thaks in advance.
Angular JS is a client side architecture, you can't connect a database directly. What you need is an API on server like web service, MVC, webapi etc, to which you can make calls from your Angular js app.
Angularjs is client side framework based on javascript. There is nothing to do retrieving data from SQL server. It is server side's duty.
You should implement on server side technologies such as .net or php, and give services to client side through web api, rest api etc.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I set up a REST API (MVC Web API). My iOS (C#/XAMARIN) and Android (C#/XAMARIN) Applications access the REST API. My webpage (C#/MVC) is able to connect the API Server or the database server directly. My question is: Should I choose the API or the SQL Server for my Web application? All applications are using the same C# class library.
This picture http://imgur.com/nHyzzmB shows my setup.
It is better to use API for the web application,
because it provides JSON or text format data response and to consume API in html / cshtml page is also good and performance of your web application must increase and if you plan for responsive design for your web application that may be used in any device then it is good to have mvc web api restful web service option.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm setting up an AngularJs site. One part is the marketing side of things (FAQ, Home page, how it works, etc) and the other part is the actual web app (authenticated). The web app is currently a SPA. Should the marketing part of it be part of the same SPA or a separate SPA?
Pulse.me has a very nice SPA type application.
https://www.pulse.me/
I ran into this same issue in my app. I ended up going for two separate SPA. My main reasoning was that I didn't want to expose JavaScript to unauthenticated users because you would be able to see calls being made to the back-end. Yes the back-end would reject them, but why even allow the random web crawler or hacker to see what they are.