Starts in:
2 DAYS
18 HRS
16 MIN
14 SEC
Starts in:
2 D
18 H
16 M
14 S
Open Closed

One solution template (include the client side project into the server side solution instead of separate solutions) #670


User avatar
0
yinchang created
  • ABP Framework version: v4.0.0
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue: Dose abp team will create one solution project template for abp suite cli ?

Here is previous issue at github :https://github.com/abpframework/abp/issues/857#issuecomment-663996864

How to host XXXX.HttpApi.Host(WebApi) and Angular at same website port:80 ?

In previous version(v3.x) , I install Microsoft.AspNetCore.SpaServices.Extensions and copy angular app( oAuthConfig responseType:password) to wwwroot/app folder can be solved.

But in v4.0 ,AccountModule has been removed and oAuthConfig responseType must be code, Is there have any suggestion ?


4 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    as far as I know, you cannot host different web applications on the same port.

  • User Avatar
    0
    arjun created

    I think OP wants to merge angular app in the host project itself so that it runs on same port.

  • User Avatar
    0
    yinchang created

    just as @arjun said : In prevous version of abp ,i could download this template :

    Will abp suite cli provider more template in the futher?

  • User Avatar
    0
    alper created
    Support Team Director

    Publish your Angular application and copy the output to wwwroot of your Host. Then a middleware like this in the Host side

    
    app.Use(async (context, next) =>
                {
                    await next();
                    if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value))
                    {
                        context.Request.Path = "/index.html";
                        await next();
                    }
                });
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06