Parcel and Rust on Nails

I'm new to Rust and currently learning how to build websites using it, specifically with Rust on Nails. I'm stuck on integrating the code compiled by Parcel, typescript with my Rust web page. I don’t know how to use the compiled output properly.

Have you followed this section from Rust-on-nails documentation?

1 Like

I have followed the tutorial, but in the last step, I don’t know how and where to use the <hello-world> element. Also, if I want to add JavaScript, which folder should I place it in, and how can I compile everything to run the website properly?

That's a custom HTML element. You would use it if you also enabled HTMX.

That's what the first page I linked is for. TypeScript compiles down to JavaScript, and parcel is a bundler that stitches everything together.

I understand that following the documentation without having a background in web development is very puzzling but, on the other hand, I would only consider using these template-based frameworks for very simple websites that are mostly static.

1 Like

What I am trying to talk about is how to implement JS and CSS assets in topic Typescript. In this docs, it only instruct me how to create element <hello> but does not tell me how to implement or use this element with rust web server, or web page that I have built before