33 lines
539 B
Plaintext
33 lines
539 B
Plaintext
|
|
from .ServerInterface import ServerInterface
|
|
from file import File
|
|
|
|
constants {
|
|
FILENAME = "received.txt"
|
|
}
|
|
|
|
|
|
service ExampleServer {
|
|
|
|
embed File as file
|
|
|
|
inputPort server {
|
|
Location: "socket://localhost:9000"
|
|
Protocol: http
|
|
Interfaces: ServerInterface
|
|
}
|
|
|
|
|
|
execution:concurrent
|
|
|
|
main {
|
|
setFile( request )( response ) {
|
|
writeFile@file( {
|
|
filename = FILENAME
|
|
content = request
|
|
append = 1
|
|
} )()
|
|
}
|
|
}
|
|
}
|