Ocsigen Start: How to really get up and running in 5 minutes?

Thanks for your quick answer!

The server console seems to show nothing suspect from my basic knowledge:

Server console
==== The website is available at http://localhost:8080 ====
ocsigenserver "-v" -c local/etc/web1/web1-test.conf
ocsigenserver: ocsigen:config: While parsing config file, tag <host>: No defaulthostname, assuming it is "test"
ocsigenserver: ocsigen:main: Ocsigen has been launched (initialisations ok)
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): 
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): web1_d2c033bb6bbef16107f446b97a1b4a4d.js
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/web1_ce18137e68ed19f2bfa62be33275944f.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_buttons.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_carousel.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_datetime.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/font-awesome.min.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_sticky.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_drawer.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_page_transition.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_icons.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_popup.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_picture_uploader.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): css/ot_spinner.css
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1 (KHTML, like Gecko) Version/11.0 Safari/605.1 Debian/9.0 (3.22.7-1) Epiphany/3.22.7): favicon.ico
ocsigenserver: access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0): css/ot_drawer.css

But the browser console clearly says there is a type error:

TypeError: s.charCodeAt is not a function [Learn More]
"Browser console

TypeError: s.charCodeAt is not a function [Learn More]

read32u
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:3280:21
caml_unwrap_value_from_string</<
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:3323:19
caml_call3
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:5129:28
unwrap
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:80542:15
unwrap_js
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:80551:1234:
dQs
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:86720:36
caml_call1
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:5125:28
case$1
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:53315:48
caml_call3
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:5129:28
get_request_data
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:86722:14
init$11
http://localhost:8080/web1_d2c033bb6bbef16107f446b97a1b4a4d.js:94652:19

TypeError: s.charCodeAt is not a function Learn More

What do you recommend to fix that?


Do you mean that it’s just hard to get up and running smoothly because of that fast moving js world, but once you correctly setup a server and a client they will work safely?
Or do you also mean that it can impact safety?

BTW, as my main concern is safety, (and assuming that js is somehow unsafe - as I’m not a js expert I can’t tell anything about js safety) can you recommend a hardened/safer setup to provide a reliable web GUI for deploying OCaml software?

I am considering to go for a desktop GUI for a few users in a controlled environment (machines can be freely configured) because safety is needed, as discussed in Reliable development of desktop GUI: which tools best suit? . And also because I’m not very confident (and experienced with advanced webdev).

What can you tell about obrowser?
It is available in Opam opam - obrowser.1.1.1 but appears as an ocsigen “unmaintained” project ocsigen other projects.
Do you think it can be reliably used instead of a desktop GUI to deploy OCaml code?