Skip to content

Commit

Permalink
Add deprecated flags
Browse files Browse the repository at this point in the history
  • Loading branch information
esquerbatua committed Aug 29, 2024
1 parent c2be169 commit 952be48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vlib/vweb/vweb.v
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ pub fn controller_host[T](host string, path string, global_app &T) &ControllerPa
}

// run - start a new VWeb server, listening to all available addresses, at the specified `port`
@[deprecated; 'migrate to veb instead']
pub fn run[T](global_app &T, port int) {
run_at[T](global_app, host: '', port: port, family: .ip6) or { panic(err.msg()) }
}
Expand All @@ -538,7 +539,7 @@ pub:

// run_at - start a new VWeb server, listening only on a specific address `host`, at the specified `port`
// Example: vweb.run_at(new_app(), vweb.RunParams{ host: 'localhost' port: 8099 family: .ip }) or { panic(err) }
@[manualfree]
@[manualfree; deprecated; 'migrate to veb instead']
pub fn run_at[T](global_app &T, params RunParams) ! {
if params.port <= 0 || params.port > 65535 {
return error('invalid port number `${params.port}`, it should be between 1 and 65535')
Expand Down

0 comments on commit 952be48

Please sign in to comment.