Ejemplo n.º 1
0
 public SpaProxyLaunchManager(
     ILogger <SpaProxyLaunchManager> logger,
     IHostApplicationLifetime appLifetime,
     IOptions <SpaDevelopmentServerOptions> options)
 {
     _options = options.Value;
     _logger  = logger;
     appLifetime.ApplicationStopping.Register(() => Dispose(true));
 }
Ejemplo n.º 2
0
        static string GenerateSpaLaunchPage(SpaDevelopmentServerOptions options)
        {
            return($@"
<!DOCTYPE html>
<html lang=""en"">
<head>
  <meta charset = ""UTF-8"" >
  <meta http-equiv=""X-UA-Compatible"" content=""IE=edge"">
  <meta http-equiv=""refresh"" content=""3"">
  <meta name=""viewport"" content=""width=device-width, initial-scale=1.0"">
  <title>SPA proxy launch page</title>
</head>
<body>
  <h1>Launching the SPA proxy...</h1>
  <p>This page will automatically redirect to <a href=""{HtmlEncoder.Default.Encode(options.ServerUrl)}"">{HtmlEncoder.Default.Encode(options.ServerUrl)}</a> when the SPA proxy is ready.</p>
</body>
</html>");
        }