I’m trying to find the best way of developing a portal that a user can log in to and then be presented with a range of different apps (angular). They should share the same api-backend.
I think that each angular-app could (and should) be developed separately. The only thing I think I need to do is place the dist-folder (or create a symlink to it) in the “portal”-part.
When I say the portal, I mean the part where user is presented with a login-screen, and after successful authentication is routed to a app-menu. Pretty static stuff really.
The api-backend can be a separate express-app to make it less complex (atleast I think so).
My goal is to make the development-process effective and easy to maintain.
Each angular-app is scaffolded with yeoman, and I develop them while doing a ‘grunt serve’. ‘grunt build’ will then produce a nicely packed app in the dist folder. I’m quite happy with this solution.
The Backend is an expressjs app, and I use nodemon to do it effectively.
My issue right now is how do I scaffold all of this ? I once tried setting up a large Gruntfile.js to build the backend, portal, and each angular-app and stitch everything together. I gave up.
As I see it, the parts I need to stitch together is:
Login/portal/menu (express/passport)
n * Angular apps
API-Backend (express/mysql)
I have a portal-part that works with passport, I have a API-backend that works, and I have some conceptual angular-apps that works.
my git-repo contains everything, and I have this structure:
git
|-- backend
| |
| +-- api
| |-- app.js
| |
| |-- lib
| |-- public
| +-- config
|
|
+-- frontend
|-- App1
| |--Gruntfile.js
| |--node_modules
| |--app
| | |--bower_components
| | |--images
| | |--views
| | +--scripts
| +--dist
|
|-- App2
| |
| |--Gruntfile.js
| |--node_modules
| |--app
| | |--bower_components
| | |--images
| | |--views
| | +--scripts
| +--dist
|
+-- Portal
|
express/passport app
Should the portal-part and the api-backend be the same ?
Any good ideas on how to scaffold this is much appreciated 🙂 (I even appreciate it if someone care to read my long question)
3