Skip to content

Commit

Permalink
Add syntax highlighting to Readme (#16)
Browse files Browse the repository at this point in the history
* Add syntax highlighting to Readme

* Change to Swift
  • Loading branch information
BasThomas authored and helje5 committed Mar 20, 2017
1 parent 7eb889f commit 8edb46b
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@ high performance statically typed and AOT-compiled language,
There is a reasonably large collection of simple, focused:
[Noze.io examples](Samples)
But here you go, the "standard" Node example, a HelloWorld httpd:

import http
http.createServer { req, res in
res.writeHead(200, [ "Content-Type": "text/html" ])
res.end("<h1>Hello World</h1>")
}
.listen(1337)

```swift
import http

http.createServer { req, res in
res.writeHead(200, [ "Content-Type": "text/html" ])
res.end("<h1>Hello World</h1>")
}
.listen(1337)
```
An echo daemon, just piping the in-end of a socket into its own-out end:

import net
net.createServer { sock in
sock.write("Welcome to Noze.io!\r\n")
sock | sock
}
.listen(1337)

```swift
import net

net.createServer { sock in
sock.write("Welcome to Noze.io!\r\n")
sock | sock
}
.listen(1337)
```
More complex stuff including a
[Todo-MVC backend](https://github.com/NozeIO/Noze.io/blob/master/Samples/todo-mvc-redis/main.swift)
can be found in the
Expand Down

0 comments on commit 8edb46b

Please sign in to comment.