[Vuejs]-Getting generated view with MVC on Docker

0👍

I’ve been fidgeting around and I’ve ended up simply grabbing the generated file and return that as a response.

public ActionResult Index()
{
    try
    {
        var fileStream = new FileStream("/app/wwwroot/index.html", FileMode.Open);
        return File(fileStream, "text/html; charset=utf-8");
    }
    catch (Exception ex)
    {
        _logger.LogError($"Kon /app/wwwroot/index.html niet openen", ex);
    }  

    return StatusCode(500);
 }

Leave a comment