Skip to content

isabella232/hwc

 
 

Repository files navigation

hwc (hostable web core)

hwc is a wrapper around Hosted Web Core API for running .NET Applications on Windows.

Dependencies

Compiling on Windows

  1. Install Golang from the golang downloads page.
  2. Install MinGW-w64 using the mingw-w64-install.exe. Select the x86_64 Architecture.
  3. 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/hwc
cd "hwc"
.\scripts\build.ps1

Cross Compiling on OSX

  1. Install Golang from the golang downloads page.
  2. Install MinGW-w64 (+ x86), brew install mingw-w64
git clone --recursive git@github.com:cloudfoundry/hwc
cd hwc
./scripts/build.sh

Cross Compiling on Linux

  1. Install Golang sudo apt-get install gccgo-go
  2. Install MinGW-w64 (+ x86), sudo apt-get install mingw-w64
git clone --recursive git@github.com:cloudfoundry/hwc
cd hwc
./scripts/build.sh

Running the Tests (Windows Only)

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: (from an administrator console)

& "path\to\ginkgo.exe" -r -race

This will run the test suite which spins up several web applications hosted under hwc.exe and validates the behavior.

Running (Windows Only)

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.

  1. Install the Windows features in the "Running the Tests" section above.
  2. Build hwc.exe, or Download the prebuilt binary from the GitHub releases page.
  3. 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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 63.4%
  • Go 16.0%
  • C# 13.6%
  • Classic ASP 5.5%
  • HTML 1.1%
  • C++ 0.2%
  • Other 0.2%