URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup

In this series of posts, I aim to guide you through the process of creating and deploying a public API. Over the course of the series, you will learn how to use the following technologies:

Rust with Rocket web framework – for handling API requests
Do…


This content originally appeared on DEV Community and was authored by Miles Watson

In this series of posts, I aim to guide you through the process of creating and deploying a public API. Over the course of the series, you will learn how to use the following technologies:

  • Rust with Rocket web framework - for handling API requests
  • Docker and Docker Compose - for containerizing your application
  • Svelte and Bulma - for creating a simple frontend
  • Elastic Beanstalk - for hosting your service
  • IAM and GitHub Actions - for automating testing + deployment

Rust

Explaining fully the reasons for choosing Rust would be a blog post in itself - instead, I recommend you watch the following video by Jon Gjengset:

If you haven't previously used Rust before, then I strongly recommend you spend some time reading through the Rust book before attempting to do any of this yourself.

Rust learning curve

Svelte

Svelte is a different kind of web framework - instead of being a library like React or Vue, it is actually a compiler under the hood. This enables you to write really clean, concise, and performant code (it does surgical DOM updates instead of using VDOM diffing+reconciliation).

If you want to learn more (or even if you don't), I can highly recommend watching this excellent presentation by the creator of Svelte.

AWS

Amazon Web Services (AWS) is the world's biggest cloud service provider. They provide over 200 services that allow organizations and individuals to rent resources from one of AWS' many data centers.

Cloud computing is becoming increasingly popular, as more and more companies prioritize agility and elasticity (which cloud platforms offer) over control and cost-efficiency (which traditional, managed infrastructure provides).

For beginners, AWS offer a free tier, which should allow you to complete this tutorial without spending any money. However, accidentally spending money is an easy mistake for beginners to make - I recommend following this video to minimize any surprise bills.

Before moving on...

  1. Install the latest stable Rust version by following these instructions
  2. Create a Github repo for storing your code (commit + push whenever you see fit)
  3. Use cargo init --bin to create a new Rust project, and check it works with cargo run
  4. Install Node.js
  5. Install Yarn with npm install --global yarn

If you have any issues, compare your code with the part-1 tag of my repo.

That's all for this post! In the next post, we will create a simple HTTP API with the Rocket web framework. Make sure to click the "Follow" button if you want to be alerted when the next part is available!

Footnote

If you enjoyed reading this, then consider dropping a like or following me:

I'm just starting out, so the support is greatly appreciated!

Disclaimer - I'm a (mostly) self-taught programmer, and I use my blog to share things that I've learnt on my journey to becoming a better developer. Because of this, I apologize in advance for any inaccuracies I might have made - criticism and corrections are welcome!


This content originally appeared on DEV Community and was authored by Miles Watson


Print Share Comment Cite Upload Translate Updates
APA

Miles Watson | Sciencx (2021-09-20T20:31:53+00:00) URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup. Retrieved from https://www.scien.cx/2021/09/20/url-shortener-with-rust-svelte-aws-1-intro-setup/

MLA
" » URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup." Miles Watson | Sciencx - Monday September 20, 2021, https://www.scien.cx/2021/09/20/url-shortener-with-rust-svelte-aws-1-intro-setup/
HARVARD
Miles Watson | Sciencx Monday September 20, 2021 » URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup., viewed ,<https://www.scien.cx/2021/09/20/url-shortener-with-rust-svelte-aws-1-intro-setup/>
VANCOUVER
Miles Watson | Sciencx - » URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/20/url-shortener-with-rust-svelte-aws-1-intro-setup/
CHICAGO
" » URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup." Miles Watson | Sciencx - Accessed . https://www.scien.cx/2021/09/20/url-shortener-with-rust-svelte-aws-1-intro-setup/
IEEE
" » URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup." Miles Watson | Sciencx [Online]. Available: https://www.scien.cx/2021/09/20/url-shortener-with-rust-svelte-aws-1-intro-setup/. [Accessed: ]
rf:citation
» URL Shortener with Rust, Svelte, & AWS (1/): Intro + Setup | Miles Watson | Sciencx | https://www.scien.cx/2021/09/20/url-shortener-with-rust-svelte-aws-1-intro-setup/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.