-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.fs
30 lines (26 loc) · 1011 Bytes
/
Program.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace DredgePos
open DredgePos
open Saturn
open Giraffe
module Program =
let router = router {
pipe_through Ajax.Router.pipeline
not_found_handler (setStatusCode 404 >=> text "404")
get "/" (redirectTo true "/login")
forward "/ajax" Ajax.Router.router
forward "/floorplan" DredgePos.Floorplan.Router.router
forward "/order" DredgePos.OrderScreen.Router.router
forward "/login" DredgePos.Authenticate.Router.router
forward "/reservations" DredgePos.Reservations.Router.router
forward "/install" DredgePos.Installer.Router.router
}
let app =
let ipAddress = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList[2];
printf $"DredgePOS is now running at http://{ipAddress}:5001\n"
application {
use_mime_types [(".woff", "application/font-woff")]
use_static "wwwroot"
use_router router
url "http://0.0.0.0:5001"
}
run app