4 ms·
I do similar, except I just deploy to AWS as a static website. Super duper minimal everything.
by Justsignedup 9y ago
I do similar, except I just deploy to AWS as a static website. Super duper minimal everything.
- INTPenis 9y agoInline JS and css? My first thought was that I'd rather leave the Rust part out and do what you suggest in order to deploy to static file cloud hosts.
- CapacitorSet 9y agoIf you want to go super-minimal at the cost of being more dependent on Amazon, you can deploy the static website on S3 and use Route53 as an HTTP frontend.
- kowdermeister 9y agoLast week I learned that if you configure your bucket name the same as your domain, then a simple CNAME record will work without Route53.
- urschrei 9y agoI don't think you can make SSL work on AWS without Route53, though. Which is (for better or worse) about to become a big problem when Google starts penalising non-SSL sites. You also can't make a AAAA record, so no IPv6.
- seeekr 9y agoPut Cloudflare in front for SSL. Not sure if that makes the solution more or less complex, never worked with Route53.
- estsauver 9y agoAs of two years ago, there was a bug with mobile safari and hash fragment preservation, which actually made using a lot of client side JS code very difficult to use directly from s3.
- cloverich 9y agoThis is what I do on Google cloud, presumably the same. CloudFlare for ssl, google Cloud DNS, then a Google bucket. Real simple, real fast.
- ztoben 9y agoYep, this is what I do for my site. 51 cents a month.
- DaveTheSane 9y agoAnd you can scale this so good, we do something like this with every branch/user story to test it on live environments. Supereasy, once set up.
- ggregoire 9y agoYes. Here is a guide to deploy a React app on S3 and CloudFront (with a backend on EC2): https://stackoverflow.com/questions/41250087/how-to-deploy-a-react-node-express-application-on-aws https://stackoverflow.com/questions/41250087/how-to-deploy-a...
- kowdermeister 9y agoThe tutorial stops where it starts to get interesting, actually implementing any logic with the backend other than serving static files. It would have been interesting to follow through a database transaction or see some data / image manipulation.
- shae 9y agoI have such a thing in Haskell: https://github.com/shapr/sporkle/blob/master/app/Main.hs https://github.com/shapr/sporkle/blob/master/app/Main.hs It's not Rust, but it is a really crappy exercise tracking app I wrote for teaching a class. Thing different about my code: I build the HTML in the source itself, and I don't use React
- anderspitman 9y agoI actually agree. I extracted this tutorial from a project I'm working on developing an RTS game for school. I'm experimenting with having the game loop run in Rust and seeing if I can send render updates fast enough to smoothly run the UI in JS. It's working pretty well so far. I'm using Protobuf 3. I'd love to get capnproto or flatbuffers working eventually, but neither of them seem to have both JS and Rust support mature yet. I think the next obvious evolution from this tutorial would be to connect a sqlite db. Not sure how easy statically linking with it is though.
- NiceGuy_Ty 9y agoAre you talking about statically linking the database itself? Seems like it'd be better to keep the database separate from the binary, unless you're working with a read-only database. For static-linking the sqlite3 library, if you're using rusqlite you can just specify the bundled feature in Cargo.toml. ``` [dependencies.rusqlite] version = "your-version-number" features = ["bundled"] ```
- anderspitman 9y agoYeah I meant statically linking the sqlite library. Thanks for the tip on how to do it
- nothrabannosir 9y agoIf you only have static files, might as well go with Netlify. Can’t beat them for simplicity.