Files
fn-serverless/examples/hash/README.md
Seif Lotfy سيف لطفي 717d8455e9 fn: support for dotnet (#326)
* Add initial support for dotnet

* Initial work on dotnet example

* fn: fix docker incantation

* fn: .gitignore

* Add README.md for dotnet example

* Update docs
2016-12-05 23:13:52 +01:00

1.1 KiB

Using dotnet with functions

Make sure you downloaded and installed dotnet. Now create an empty dotnet project in the directory of your function:

dotnet new

By default dotnet creates a Program.cs file with a main method. To make it work with IronFunction's fn tool please rename it to func.cs. Now change the code as you desire to do whatever magic you need it to do. Once done you can now create an iron function out of it.

Creating an IronFunction

Simply run

fn init <username>/<funcname>

This will create the func.yaml file required by functions, which can be built by running:

Push to docker

fn push

This will create a docker image and push the image to docker.

Publishing to IronFunctions

fn routes create <app_name>

This creates a full path in the form of http://<host>:<port>/r/<app_name>/<function>

Testing

fn run

Calling

fn call <app_name> <funcname>

or

curl http://<host>:<port>/r/<app_name>/<function>