one express server and two or multiple angular clients - angularjs

fullstack to build my app
What I'm trying to do is having multiple angular clients with one server.
To be specific, I want a website and a mobile website.
the function of both sites is same. Thus, I want only one express server using REST API.
Since I'm using angular-fullstack, I already made a website(angular app) and REST API(express) server.
I want to add another angular app to my angular-fullstack project.
Is there any documents about those kind of structure? or any advice?
thanks!

Related

Using NextJS's built in server vs Express

I'm completely new to using Nextjs and want to learn it by building a project. I also want to use tRPC with it. I was reading the docs on using NextJS and tRPC and I learnt that there is a built in server in the /api under the pages folder. All the endpoints and server functions lives there.
I was wondering if I should be deploying all my server functions inside just the api folder or creating a separate custom Express server. It seems unscalable and weird to put all my server code into one client endpoint. To be clear I just want to do Authentication and CRUD functions but for future bigger projects, where such code would be split into microservices, would that then be deployed on a custom Express server instead?

Steps to connect Angular4 to a Database (Oracle)

Actually I've to connect my Angular project to a database to access some data. But I don't know how.
Should I write a REST API to do it? If yes, how can I connect my REST API to my project?
Which steps should I follow?
Thanks
The angular application will be your "front" application. To store and fetch data
from a database you'll need a "back" application that will provide URLS for your angular App to call.
A simple back can be done using Laravel and OCI 8 connector in order to query ORACLE database. The backend would be in PHP which is a common solution but might not fit your needs.
Set up your laravel project : https://laravel.com/docs/5.4
Install OCI8 module to connect to your oracle database : https://github.com/yajra/laravel-oci8
Then follow laravel's guidelines to set up URLs that will be callable by your front application in Angular4.

Use different variables for dev and prod with AngularJS and GruntJS

I am currently working on an Angular website that communicates with a RESTful API running on node.js that I built only for this app. They are two separate projects that runs on different ports.
While developing, I make the Angular app communicating with the local API. In production, the path to the API will be the IP address of the server. This is not a lot of work but I then need to change the address every time I want to deploy to production.
So here is some questions (sorry if this is a duplicate, I couldn't find it) :
Is it possible to create a two-sided variable (in grunt, in angular) in order to use some address (localhost) for development and another address for production ?
Maybe I got it all wrong and I should merge the API with the app ? I would have one big web server running on the same port and I could use relative paths and get rid of hostnames. How can I do to merge the express routes for the API with the angular routes ?
Thank you !

AngularJS app - with Lumen or Laravel?

I am about to build web application consisting of three parts:
Public data-oriented websites for unauthenticated users with geolocation search, ...
Member area (with authentication) for managing the data
Mobile app/apps with the same functionalities
The airbnb.com is a good example of the structure.
Basicaly the thing is to create a server side API which will be shared accross clients.
I definitelly want to use AngularJS for the client side, but I am not sure which of those solutions is better:
Create the API with microframework Lumen and add sessions / authentication / html serving / other services to the Lumen
Create the API with full stack framework Laravel and serve html to AngularJS
Thank you for your suggestions.
You will need a solid api, lumen has all we need to build an api. You can go ahead with option 1 as you can later on migrate to full stack laravel framework, if needed.

Website that communicates with Server

I'm a newbie. Im thinking about developing a website that people can be come members of and login. I know that ill need to have a server with a database to store info. What i need to know is, do i just need to create the server host site host it and then have my website hosted somewhere else. To sum up, what's needed in the process of developing this type of site?
No, you can host everything in the same server. Back-end and front-end are words just to describe the organization of your code, being HTML, CSS and Javascript files your front-end, and the rest your backend.
Most host services today have Ruby, PHP and ASP supported by all plans, just as MySQL. There are no need for developing two parts in your application - but you can do that if you want.
I suggest you start by studying what is the MVC structure.

Resources