File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 8383webio_serve (page (" /" , req -> myapp (req)))
8484```
8585
86+ - Generic ** HTTP**
87+
88+ You can use the generic HTTP provider for any app - without the need to rely on WebIO.
89+
90+ ``` julia
91+
92+ # You can just create your own display function
93+ function Base. display (d:: MyWebDisplay , m:: MIME"application/webio" , app)
94+ println (d. io, " outer html" )
95+ # calling show will make sure a server is running and serves dependencies
96+ # from AssetRegistry and a websocket connection gets established.
97+ show (d. io, m, app) # <- prints the html + scripts webio needs to work into io
98+ println (d. io, " close outer html" )
99+ end
100+ # You can customize the server via the following environment variables:
101+
102+ ENV [" JULIA_WEBIO_BASEURL" ] = " url/to/base/route" # e.g. if you have a proxy
103+
104+ url = ENV [" WEBIO_SERVER_HOST_URL" ] = " 127.0.0.1" # the url you want the server to listen on
105+ http_port = ENV [" WEBIO_HTTP_PORT" ] = " 8081" # the port you want the server to listen on
106+ # the url that the websocket connects to:
107+ ENV [" WEBIO_WEBSOCKT_URL" ] = string (url, " :" , http_port, " /webio_websocket/" )
108+
109+ ```
110+
111+
86112Composing content
87113------------------
88114
You can’t perform that action at this time.
0 commit comments