Skip to content

Commit fa7a36a

Browse files
committed
Add CSharp/Ruby to guide
- Ruby explanation could be expanded Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
1 parent a776b26 commit fa7a36a

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

docs/cli/templates.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $ dep ensure -add github.com/cnf/structhash
5656

5757
You can now edit your function and add an import statement in `handler.go` to `github.com/cnf/structhash`.
5858

59-
## 2.0 Python
59+
## 2.0 Python 3
6060

6161
To create a Python function named `pycon` type in:
6262

@@ -72,6 +72,8 @@ pycon/handler.py
7272
pycon/requirements.txt
7373
```
7474

75+
> Note: Python 2.7 is also available with the language template `python`.
76+
7577
### 2.1 Python: dependencies
7678

7779
You should edit `pycon/requirements.txt` and add any pip modules you want with each one on a new line, for instance `requests`.
@@ -129,7 +131,27 @@ npm i --save cheerio
129131

130132
You can now add a `require('cheerio')` statement into your function and make use of this library.
131133

132-
## 4.0 Java
134+
## 4.0 CSharp / .NET Core 2.1
135+
136+
You can create functions in .NET Core 2.1 using C# / CSharp.
137+
138+
* Write a function named csharp-function
139+
140+
```
141+
faas-cli new --lang csharp csharp-function
142+
```
143+
144+
Now you can open your current folder in a tool such as Visual Studio Code and add dependencies using the project (csproj) file.
145+
146+
## 5.0 Ruby
147+
148+
OpenFaaS has first-class support for Ruby.
149+
150+
Just create a new function by passing in `--lang ruby` as an argument.
151+
152+
Manage your dependencies through your `Gemfile` placed in the function's folder.
153+
154+
## 6.0 Java
133155

134156
A Java 8 template is provided which uses Gradle 4.8.1 as a build-system.
135157

0 commit comments

Comments
 (0)