vweb: support ipv6 (#13498)

pull/13508/head
Anton Zavodchikov 2022-02-18 01:13:36 +05:00 committed by GitHub
parent eb45a321a5
commit da9331f8ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -385,7 +385,7 @@ pub fn run<T>(global_app &T, port int) {
// Example: `vweb.run_at(app, 'localhost', 8099)` // Example: `vweb.run_at(app, 'localhost', 8099)`
[manualfree] [manualfree]
pub fn run_at<T>(global_app &T, host string, port int) { pub fn run_at<T>(global_app &T, host string, port int) {
mut l := net.listen_tcp(.ip, '$host:$port') or { panic('failed to listen $err.code $err') } mut l := net.listen_tcp(.ip6, '$host:$port') or { panic('failed to listen $err.code $err') }
// Parsing methods attributes // Parsing methods attributes
mut routes := map[string]Route{} mut routes := map[string]Route{}