-
Notifications
You must be signed in to change notification settings - Fork 29
Quick Start
Brian Zou edited this page Jun 3, 2020
·
3 revisions
# dub init myproject
# cd myproject/
# dub add hunt-framework
# rm -rf source/app.d
import hunt.framework;
void main(string[] args)
{
app().run(args);
}
module app.controller.MyController;
import hunt.framework;
class MyController : Controller
{
mixin MakeController;
@Action
string test()
{
return "Hello world!";
}
}
http.address = 127.0.0.1
http.port = 8080
GET / my.test
"targetType": "executable"
# dub run
http://127.0.0.1:8080