Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinmoris committed Dec 20, 2017
2 parents 3b73cd2 + 8364a4c commit f2a36e4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 48 deletions.
83 changes: 41 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The old NuGet package has been unlisted and will no longer receive any updates.
## Table of contents

- [About](#about)
- [Installation](#installation)
- [Basics](#basics)
- [HttpHandler](#httphandler)
- [Combinators](#combinators)
Expand Down Expand Up @@ -87,7 +88,6 @@ The old NuGet package has been unlisted and will no longer receive any updates.
- [BindQueryString](#bindquerystring)
- [BindModelAsync](#bindmodelasync)
- [Error Handling](#error-handling)
- [Installation](#installation)
- [Sample applications](#sample-applications)
- [Benchmarks](#benchmarks)
- [Building and developing](#building-and-developing)
Expand All @@ -112,6 +112,46 @@ It is not designed to be a competing web product which can be run standalone lik

You can think of [Giraffe](https://www.nuget.org/packages/Giraffe) as the functional counter part of the ASP.NET Core MVC framework.

## Installation

### Using dotnet-new

The easiest way to get started with Giraffe is by installing the [`giraffe-template`](https://www.nuget.org/packages/giraffe-template) package, which adds a new template to your `dotnet new` command line tool:

```
dotnet new -i "giraffe-template::*"
```

Afterwards you can create a new Giraffe application by running `dotnet new giraffe`.

For more information about the Giraffe tempalte please visit the official [giraffe-template repository](https://github.com/giraffe-fsharp/giraffe-template).

### Doing it manually

Install the [Giraffe](https://www.nuget.org/packages/Giraffe) NuGet package:

```
PM> Install-Package Giraffe
```

Create a web application and plug it into the ASP.NET Core middleware:

```fsharp
open Giraffe
let webApp =
choose [
route "/ping" >=> text "pong"
route "/" >=> htmlFile "/pages/index.html" ]
type Startup() =
member __.Configure (app : IApplicationBuilder)
(env : IHostingEnvironment)
(loggerFactory : ILoggerFactory) =
app.UseGiraffe webApp
```

## Basics

### HttpHandler
Expand Down Expand Up @@ -1605,47 +1645,6 @@ type Startup() =

It is recommended to set the error handler as the first middleware in the pipeline, so that any unhandled exception from a later middleware can be caught and processed by the error handling function.

## Installation

### Using dotnet-new

The easiest way to get started with Giraffe is by installing the [`giraffe-template`](https://www.nuget.org/packages/giraffe-template) NuGet package, which adds a new template to your `dotnet new` command:

```
dotnet new -i "giraffe-template::*"
```

Afterwards you can create a new Giraffe application by running `dotnet new giraffe`.

For more information about the Giraffe tempalte please visit the official [giraffe-template repository](https://github.com/giraffe-fsharp/giraffe-template).

### Doing it manually

Install the [Giraffe](https://www.nuget.org/packages/Giraffe) NuGet package:

```
PM> Install-Package Giraffe
```

Create a web application and plug it into the ASP.NET Core middleware:

```fsharp
open Giraffe.HttpHandlers
open Giraffe.Middleware
let webApp =
choose [
route "/ping" >=> text "pong"
route "/" >=> htmlFile "/pages/index.html" ]
type Startup() =
member __.Configure (app : IApplicationBuilder)
(env : IHostingEnvironment)
(loggerFactory : ILoggerFactory) =
app.UseGiraffe webApp
```

## Sample applications

### Demo apps
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ test: off
artifacts:
- path: '**\Giraffe.*.nupkg'
name: Giraffe NuGet packages
- path: '**\giraffe-template.*.nupkg'
name: Giraffe Template package
nuget:
account_feed: false
project_feed: true
Expand Down
8 changes: 4 additions & 4 deletions src/Giraffe/Giraffe.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<OutputType>Library</OutputType>
<PackageId>Giraffe</PackageId>
<PackageTags>Giraffe;ASP.NET Core;Lambda;FSharp;Functional;Http;Web;Framework;Micro;Service</PackageTags>
<PackageReleaseNotes>https://github.com/dustinmoris/giraffe/releases</PackageReleaseNotes>
<PackageIconUrl>https://raw.githubusercontent.com/dustinmoris/giraffe/master/giraffe-64x64.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/dustinmoris/giraffe</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/dustinmoris/giraffe/master/LICENSE</PackageLicenseUrl>
<PackageReleaseNotes>https://raw.githubusercontent.com/giraffe-fsharp/giraffe/master/RELEASE_NOTES.md</PackageReleaseNotes>
<PackageIconUrl>https://raw.githubusercontent.com/giraffe-fsharp/giraffe/master/giraffe-64x64.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/giraffe-fsharp/giraffe</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/giraffe-fsharp/giraffe/master/LICENSE</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/dustinmoris/giraffe</RepositoryUrl>
Expand Down

0 comments on commit f2a36e4

Please sign in to comment.