hwc
is a wrapper around Hosted Web Core API for running .NET Applications on Windows.
- Install Golang from the golang downloads page.
- Install MinGW-w64 using the mingw-w64-install.exe. Select the
x86_64
Architecture. - Ensure you've set the GOPATH environment variable.
- Ensure you've added the
x86_64-w64-mingw32-gcc
compiler to your Windows PATH. It will be installed to a directory similar to:C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin
git clone --recursive git@github.com:cloudfoundry-incubator/hwc "$env:GOPATH/src/code.cloudfoundry.org/hwc"
cd "$env:GOPATH/src/code.cloudfoundry.org/hwc"
.\scripts\build.ps1
- Install Golang from the golang downloads page.
- Install MinGW-w64,
brew install mingw-w64
- Ensure you've set the GOPATH environment variable.
git clone --recursive [email protected]:cloudfoundry-incubator/hwc $GOPATH/src/code.cloudfoundry.org/hwc
cd $GOPATH/src/code.cloudfoundry.org/hwc
./scripts/build.sh
- Install Golang
sudo apt-get install gccgo-go
- Install MinGW-w64,
sudo apt-get install mingw-w64
- Ensure you've set the GOPATH environment variable.
git clone --recursive [email protected]:cloudfoundry-incubator/hwc $GOPATH/src/code.cloudfoundry.org/hwc
cd $GOPATH/src/code.cloudfoundry.org/hwc
./scripts/build.sh
Install Windows/.NET Features from Powershell by running:
Enable-WindowsOptionalFeature -Online -All -FeatureName IIS-WebServer
Enable-WindowsOptionalFeature -Online -All -FeatureName IIS-WebSockets
Enable-WindowsOptionalFeature -Online -All -FeatureName IIS-HostableWebCore
Enable-WindowsOptionalFeature -Online -All -FeatureName IIS-ASPNET45
Install ginkgo:
go get github.com/onsi/ginkgo/ginkgo
Execute the tests:
& "$env:GOPATH\bin\ginkgo.exe" -r -race
This will run the test suite which spins up several web applications hosted under hwc.exe and validates the behavior.
When web applications are pushed to Cloud Foundry they are pushed out to one or more Windows cells and run via hwc.exe
. For development purposes you can run an ASP.NET web application much like IISExpress by directly invoking hwc.exe
.
- Install the Windows features in the "Running the Tests" section above.
- Build hwc.exe, or Download the prebuilt binary from the GitHub releases page.
- From PowerShell start the web server:
& { $env:PORT=8080; .\hwc.exe -appRootPath "C:\wwwroot\inetpub\myapproot" }
. Ensure the appRootPath points to a directory with a ready to run ASP.NET application.
You should now be able to browse to http://localhost:8080/
and even attach a debugger and set breakpoints to the hwc.exe
process if so desired.