Compare commits
No commits in common. "f683acf0ae0865cc9ba661f5c4010c495f95cab8" and "ba304c85c345e518f0bc841aa72e2f41693aa5b5" have entirely different histories.
f683acf0ae
...
ba304c85c3
@ -1,4 +1,2 @@
|
|||||||
Dockerfile
|
|
||||||
target
|
target
|
||||||
*/node_modules
|
*/node_modules
|
||||||
*/yarn.lock
|
|
||||||
|
|||||||
@ -3,13 +3,7 @@ COPY ./ /src/
|
|||||||
COPY ./dockerfiles/netrc /root/.netrc
|
COPY ./dockerfiles/netrc /root/.netrc
|
||||||
RUN mkdir /root/.cargo
|
RUN mkdir /root/.cargo
|
||||||
COPY ./dockerfiles/cargo-config /.cargo/config
|
COPY ./dockerfiles/cargo-config /.cargo/config
|
||||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
RUN apt-get update && apt-get install -y strace build-essential clang
|
||||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash -
|
|
||||||
RUN apt-get update && apt-get install -y strace build-essential clang nodejs yarn
|
|
||||||
WORKDIR /src/react-slideshow
|
|
||||||
RUN yarn install
|
|
||||||
RUN yarn build
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
RUN cargo version && cargo install --path .
|
RUN cargo version && cargo install --path .
|
||||||
|
|
||||||
|
|||||||
14
src/web.rs
14
src/web.rs
@ -103,19 +103,9 @@ struct Asset;
|
|||||||
|
|
||||||
fn embedz() -> Result<impl warp::Reply, warp::Rejection> {
|
fn embedz() -> Result<impl warp::Reply, warp::Rejection> {
|
||||||
let mut w = Vec::new();
|
let mut w = Vec::new();
|
||||||
write!(
|
write!(w, "<html>").unwrap();
|
||||||
w,
|
|
||||||
r#"<html><table><tbody><tr><th>size</th><th style="text-align: left;">path</th></tr>"#
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
for path in Asset::iter() {
|
for path in Asset::iter() {
|
||||||
write!(
|
write!(w, r#"<div><a href="{0}">{0}</a></div>"#, path).unwrap();
|
||||||
w,
|
|
||||||
r#"<tr><td style="text-align: right;">{0}</td><td><a href="{1}">{1}</a></td</tr>"#,
|
|
||||||
Asset::get(&path).unwrap().len(),
|
|
||||||
path
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
Ok(warp::http::Response::builder()
|
Ok(warp::http::Response::builder()
|
||||||
.header("Content-Type", "text/html")
|
.header("Content-Type", "text/html")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user