Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Question: Having subpath/Virtual Directory in IIS hosted development setup #1523

Closed
@sjsingh85

Description

@sjsingh85

I am using Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0-rc1-final which internally uses Create-react-app and AspnetCore.ReactDevelopmentServer

My Dev. Environment is using IIS for hosting multiple api's say api1 as http://localhost/api1 and api2 as http://localhost/api2

Problem is if I host my Asp.Net core React app from Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0-rc1-final template to http://localhost/myApp - it expects the files are always served with PublicPath "/" and hence does not work.

This feature is due for release in react-scripts 2.0 which should include facebook/create-react-app#1887. This will allow subpaths to be included in url from where the files are being served in create-react-app.

Just wanted to check if there is any work around for it at this time?

Activity

SteveSandersonMS

SteveSandersonMS commented on Feb 21, 2018

@SteveSandersonMS
Member

Just wanted to check if there is any work around for it at this time?

We're limited to what create-react-app itself offers, so please see create-react-app docs for any techniques to control what URLs it looks for resources at. Hope that's OK!

sjsingh85

sjsingh85 commented on Apr 20, 2018

@sjsingh85
Author

For people coming to this thread - create-react-app has a proxy api requests feature - https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development which helped in my case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @SteveSandersonMS@sjsingh85

        Issue actions

          Question: Having subpath/Virtual Directory in IIS hosted development setup · Issue #1523 · aspnet/JavaScriptServices