mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-04 20:30:37 +00:00
Build Media Proxy
This commit is contained in:
parent
16bf825e14
commit
a1e57d874f
6 changed files with 142 additions and 34 deletions
|
@ -39,7 +39,7 @@ async fn main() -> std::io::Result<()> {
|
|||
}
|
||||
|
||||
// start http server
|
||||
println!("Running Libreddit on {}!", address);
|
||||
println!("Running Libreddit on {}!", address.clone());
|
||||
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
|
@ -47,6 +47,8 @@ async fn main() -> std::io::Result<()> {
|
|||
.service(style)
|
||||
.service(favicon)
|
||||
.service(robots)
|
||||
// PROXY SERVICE
|
||||
.service(proxy::handler)
|
||||
// POST SERVICES
|
||||
.service(post::short)
|
||||
.service(post::page)
|
||||
|
@ -57,7 +59,8 @@ async fn main() -> std::io::Result<()> {
|
|||
// USER SERVICES
|
||||
.service(user::page)
|
||||
})
|
||||
.bind(address)?
|
||||
.bind(address.clone())
|
||||
.expect(format!("Cannot bind to the address: {}", address).as_str())
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue