25 lines
411 B
V
25 lines
411 B
V
module main
|
|
|
|
import vweb
|
|
import net.http
|
|
|
|
struct App {
|
|
vweb.Context
|
|
}
|
|
|
|
fn main() {
|
|
vweb.run(&App{}, 5643)
|
|
}
|
|
|
|
['/:path...']
|
|
fn (mut app App) wildcard(path string) vweb.Result {
|
|
mut st := "${path}?"
|
|
for key, value in app.query {
|
|
st += "${key}=${value}&"
|
|
}
|
|
|
|
resp := http.get_text('https://mv.overte.org/${st}')
|
|
app.set_content_type("application/json")
|
|
return app.ok(resp)
|
|
}
|