jedireza / aqua

:bulb: A website and user system starter
https://jedireza.github.io/aqua/
MIT License
1.38k stars 358 forks source link

How to deploy both front end and api? #142

Closed springuper closed 7 years ago

springuper commented 7 years ago

We want to use Aqua as an internal user system. Front end is useful for admins to manage users/groups/permissions in a straightforward UI. But we also need API to let other internal systems to get user information, redirect unauthenticated users to internal user system and redirect back when they have login.

Is there any way to reach our requirements?

jedireza commented 7 years ago

Thanks for creating an issue.

But we also need API to let other internal systems to get user information, redirect unauthenticated users to internal user system and redirect back when they have login.

Can you give an example use case?

springuper commented 7 years ago

use case:

we can deploy both aqua and frame for current usage, but as they two share a lot of backend code, there may be some upgrade inconsistent issues.

jedireza commented 7 years ago

Aqua took Frame and added to it. Consider it a fork of Frame. I don't see a benefit of running both boilerplates and connecting them to the same same database. That sounds like a maintenance nightmare.

Side note: One cool thing about hapi is that you can create multiple connections in the same app bound to different ports. See: http://hapijs.com/api#serverconnections

The scenerio you describe is advanced so there will be more complexity getting an ideal setup. Here's what I'm thinking:

I'm sure I'm missing a lot of steps you'll need to take, but those are my fist thoughts. I hope that helps.

springuper commented 7 years ago

@jedireza thanks a lot. I'm trying to modify aqua to use multi auth strategies for a route, so both front-end and other system can access it.

I'll update the results here.