lweb/server_example.pb

65 lines
1.1 KiB
Plaintext

;****************************
;*
;* Lihaso Web Server
;*
;* (c)2015 by Linder Hard- und Software
;*
;* V0.1
;* - Initial Web Server
;* - Modul interface ?
;*
EnableExplicit
;*
;* Deklaration Variabeln
;*
XIncludeFile "lweb_header.pbi"
XIncludeFile "lweb.pbi"
Define counter, v_lweb_srv_stop
lhs_web::set_config(lhs_web::#conf_port, "8099")
;lhs_web::set_config(lhs_web::#conf_binding, "127.0.0.1")
lhs_web::set_config(lhs_web::#conf_binding, "0.0.0.0")
lhs_web::set_config(lhs_web::#conf_defaultfile, "index.html")
lhs_web::set_config(lhs_web::#conf_basedir, "/srv/www/htdocs/")
lhs_web::set_config(lhs_web::#conf_error400, "integrated")
lhs_web::set_config(lhs_web::#conf_max_clients, "100")
lhs_web::set_config(lhs_web::#conf_cache_enable, "0")
;*
;* includes
;*
;*
;* Initialisierung Netzwerk
;*
If InitNetwork()
;Alles IO
;PrintN("Network initalised")
Debug "Network initalised"
Else
Debug "Network initalisation failen... stop"
End
EndIf
If lhs_web::start_server()
Debug "Server gestartet"
Else
Debug "Fehlgeschlagen"
End
EndIf
counter = 0
OpenConsole("Test")
PrintN("Press Enter to Exit")
Input()
End