Skip to content

Commit

Permalink
Add example web.config with environment variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
RickStrahl committed Oct 12, 2019
1 parent 48416dd commit c0cb2dc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
28 changes: 22 additions & 6 deletions LiveReloadServer/LiveReloadServer.csproj
@@ -1,11 +1,11 @@
<!--<Project Sdk="Microsoft.NET.Sdk.Web">-->
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Web">
<!--<Project Sdk="Microsoft.NET.Sdk">-->

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Version>0.1.7</Version>
<!--<RazorCompileOnPublish>false</RazorCompileOnPublish>-->
<Version>0.1.8</Version>
<RazorCompileOnPublish>false</RazorCompileOnPublish>

<Authors>Rick Strahl</Authors>
<Company>West Wind Technolologies</Company>
Expand All @@ -17,11 +17,13 @@
<PublishTrimmed>true</PublishTrimmed>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>-->

<PackAsTool>true</PackAsTool>

<!--<PackAsTool>true</PackAsTool>
<ToolCommandName>LiveReloadServer</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>-->


<Description>
LiveReloadServer provides a generic Web Server for static files and loose Razor files in any local folder. Commandline options let you customize the path, port and a host of other options. Live Reload provides the ability to change static files and Razor files and automatically refresh the active page in the browser.
Expand All @@ -40,13 +42,27 @@
<PackageIconUrl>https://github.com/RickStrahl/Westwind.AspnetCore.LiveReload/raw/master/icon.png</PackageIconUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>USE_RAZORPAGES</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;USE_RAZORPAGES</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Remove="SOS_README.md" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<!--<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />-->

<PackageReference Include="Westwind.AspNetCore.LiveReload" Version="0.1.5.4" />

<PackageReference Include="Westwind.Utilities" Version="3.0.30" />
</ItemGroup>

<ItemGroup Condition="$(DefineConstants.Contains(USE_RAZORPAGES))">
Expand Down
20 changes: 20 additions & 0 deletions LiveReloadServer/web.config
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\LiveReloadServer.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="ASPNET_ENVIRONMENT" value="Production" />
<environmentVariable name="LIVERELOADSERVER_WEBROOT" value="C:\WebConnectionProjects\Vue\web" />
<environmentVariable name="LIVERELOADSERVER_RazorEnabled" value="True" />
<environmentVariable name="LIVERELOADSERVER_LIVERELOADENABLED" value="True" />
</environmentVariables>
</aspNetCore>

</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 3409CB5D-77AE-4867-9135-A3DE2A134C4D-->

0 comments on commit c0cb2dc

Please sign in to comment.