- Ensure "{home}/bin" is in your path
- Fantom launcher:
- Unix: "bin/fan" bash script
- Windows: "bin/fan.exe" executable
- Verify setup "fan -version"
For further information see Setup
The hello.fanx file:
class Hello {
fun main() { echo("Hello World") }
}
Run:
fan hello.fanx
using vaseGui
class HelloTest
{
static fun main() {
root := Frame {
Button {
text = "Press Me"
onClick {
Toast("Hello World").show(it)
}
},
}
root.show
}
}
File './public/hello.fanx':
using slanWeb
class Hello : SlanWeblet
{
fun hi()
{
setContentType("html")
res.out.print("<h2>Hello World!</h2>")
}
}
run server:
fan slanWeb -resPath public/
You should be able to hit http://localhost:8080/ with your browser!
generate the HTML docs
fan compilerDoc -all
This will generate the HTML docs for all the pods found in your local working environment.