This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// module name shoild follow folders, like PSR-4 | |
module controllers | |
import "http" exposing Request, Response | |
export class HelloController { | |
exposed function handle(req Request, res Response) { | |
return res.send("Hello") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// module name shoild follow folders, like PSR-4 | |
module controllers | |
import "http" exposing Request, Response | |
export class HelloController { | |
exposed function handle(req Request, res Response) { | |
return res.send("Hello") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "http" exposing HttpServer, Request, Response | |
function main() { | |
HttpServer.get("/", func (req Request, res Response) => { | |
return res.Send("Hello!") | |
}) | |
HttpServer.listen(8080) | |
} |
NewerOlder