Store static portal files in repo and install with Makefile
[hcoop/portal.git] / app / app.sml
index 911b5cb..52b9877 100644 (file)
@@ -1,8 +1,8 @@
 structure App :> APP =
 struct
 
-val baseUrl = "https://join.hcoop.net/join/"
-val portalUrl = "https://members.hcoop.net/portal/"
+val baseUrl = "https://join3.hcoop.net/join/"
+val portalUrl = Config.urlPrefix
 
 open Sql
 
@@ -14,7 +14,7 @@ val rnd = ref (Random.rand (0, 0))
 
 fun init () = 
     let
-       val c = C.conn "dbname='hcoop_hcoop'"
+       val c = C.conn Config.dbstring
     in
        db := SOME c;
        C.dml c "BEGIN";
@@ -46,9 +46,9 @@ fun readFile fname =
        before TextIO.closeIn inf
     end
 
-fun readTosBody () = readFile "/home/hcoop/public_html/tos.body.html"
-fun readTosAgree () = readFile "/home/hcoop/public_html/tos.agree.html"
-fun readTosMinorAgree () = readFile "/home/hcoop/public_html/tos.agree.minor.html"
+fun readTosBody () = readFile (Config.staticFilesRoot ^ "tos.body.html")
+fun readTosAgree () = readFile (Config.staticFilesRoot ^ "tos.agree.html")
+fun readTosMinorAgree () = readFile (Config.staticFilesRoot ^ "tos.agree.minor.html")
 
 fun sendMail (to, subj, intro, footer, id) =
     let