Some server stuff
This commit is contained in:
parent
f4e4e2eae1
commit
a90f721dc4
6 changed files with 8 additions and 9750 deletions
5
Makefile
5
Makefile
|
@ -1,6 +1,7 @@
|
|||
all: frontend backend
|
||||
|
||||
produce: frontend-produce backend
|
||||
echo REMEMBER to RESTART elmskell.service TO UPDATE SITE IN PLACE
|
||||
|
||||
run:
|
||||
stack exec ~/.local/bin/hs-server-exe
|
||||
|
@ -12,7 +13,7 @@ frontend: frontend-format
|
|||
cd frontend && elm make src/Main.elm --output=../assets/js/main.js
|
||||
|
||||
frontend-produce: frontend-format
|
||||
cd frontend && elm make src/Main.elm --optimize --output=../assets/js/main
|
||||
cd frontend && elm make src/Main.elm --optimize --output=../assets/js/main.js
|
||||
uglifyjs assets/js/main.js --compress "pure_funcs=[F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9],pure_getters,keep_fargs=false,unsafe_comps,unsafe" | uglifyjs --mangle --output assets/js/main.js
|
||||
|
||||
frontend-format:
|
||||
|
@ -22,4 +23,4 @@ clean:
|
|||
touch assets/js/main.js
|
||||
rm assets/js/main.js
|
||||
|
||||
.PHONY: all produce run backend frontend frontend-produce frontend-format clean
|
||||
.PHONY: all produce run start backend frontend frontend-produce frontend-format clean
|
||||
|
|
9745
assets/js/main.js
9745
assets/js/main.js
File diff suppressed because one or more lines are too long
|
@ -26,7 +26,7 @@ index compiledElmApp = renderHtml $ do
|
|||
|
||||
-- CONF
|
||||
port :: Port
|
||||
port = 3000
|
||||
port = 8080
|
||||
|
||||
adminContact :: String
|
||||
adminContact = "[Matrix] @mtgmonkey:calitabby.net"
|
||||
|
@ -38,7 +38,7 @@ boilerplateJsFile :: AssetPath
|
|||
boilerplateJsFile = "/js/init.js"
|
||||
|
||||
assetsFolder :: FilePath
|
||||
assetsFolder = "./assets"
|
||||
assetsFolder = "/home/mtgmonkey/elmskell/assets"
|
||||
|
||||
-- MAIN
|
||||
main :: IO ()
|
||||
|
@ -78,7 +78,7 @@ main = do
|
|||
serverErrorReadFile :: E.IOException -> Js
|
||||
serverErrorReadFile e = H.toHtml $ "document.getElementById('body').innerHTML='Server-side error occurred: "
|
||||
++ (show e)
|
||||
++ "; report htis to a site administrator: "
|
||||
++ "; report this to a site administrator: "
|
||||
++ adminContact
|
||||
++ "';"
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -66,7 +66,7 @@ init : E.Value -> Url.Url -> Nav.Key -> ( Model, Cmd Msg )
|
|||
init flags url key =
|
||||
let
|
||||
initContent =
|
||||
[ text "Welcome to my website!"
|
||||
[ text "Welcome to my website! Pardon the alpha quality for the time being"
|
||||
, text "\nRun `help` to get started"
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue