cloudfoundry/hwc

Name: hwc

Owner: Cloud Foundry

Description: null

Created: 2017-02-01 15:59:21.0

Updated: 2018-05-11 22:14:59.0

Pushed: 2018-05-10 20:59:09.0

Homepage: null

Size: 44294

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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 set the GOPATH environment variable.
  4. 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
clone --recursive git@github.com:cloudfoundry-incubator/hwc "$env:GOPATH/src/code.cloudfoundry.org/hwc"
$env:GOPATH/src/code.cloudfoundry.org/hwc"
ripts\build.ps1
Cross Compiling on OSX
  1. Install Golang from the golang downloads page.
  2. Install MinGW-w64, brew install mingw-w64
  3. Ensure you've set the GOPATH environment variable.
clone --recursive git@github.com:cloudfoundry-incubator/hwc $GOPATH/src/code.cloudfoundry.org/hwc
GOPATH/src/code.cloudfoundry.org/hwc
ripts/build.sh
Cross Compiling on Linux
  1. Install Golang sudo apt-get install gccgo-go
  2. Install MinGW-w64, sudo apt-get install mingw-w64
  3. Ensure you've set the GOPATH environment variable.
clone --recursive git@github.com:cloudfoundry-incubator/hwc $GOPATH/src/code.cloudfoundry.org/hwc
GOPATH/src/code.cloudfoundry.org/hwc
ripts/build.sh
Running the Tests (Windows Only)

Install Windows/.NET Features from Powershell by running:

le-WindowsOptionalFeature -Online -All -FeatureName IIS-WebServer
le-WindowsOptionalFeature -Online -All -FeatureName IIS-WebSockets
le-WindowsOptionalFeature -Online -All -FeatureName IIS-HostableWebCore
le-WindowsOptionalFeature -Online -All -FeatureName IIS-ASPNET45

Install ginkgo:

et 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.

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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.