Better Programming

Advice for programmers.

Follow publication

Member-only story

Implementing a Web App With Rocket

applied.math.coding
Better Programming
Published in
6 min readApr 30, 2022

--

In this story, I want to show you an example of how one can create a web application with a backend on top of the Rocket framework.

Moreover, we will containerize the app by building a docker image. The application is deemed to do something very simple. It will provide the visualization of a convex hull of random points as has been promised in my recent post here. If you are interested in the used algorithm you may consult the aforementioned article, but it is not inevitable necessary in order to understand what follows. If you are totally new to Rust, you might want to start with some introduction like here before reading this story.

Our goals in this story are as follows:

  1. creating a Rocket server and serving Graham’s scan algorithm by an API
  2. creating a browser-based front-end that requests the server to run the above algorithm for a set of random points
  3. hosting the front-end on the Rocket server as static resources
  4. creating a docker file that builds the front-end, the back-end and runs the server

Creating a server:

--

--

applied.math.coding
applied.math.coding

Written by applied.math.coding

I am a Software Developer - Java, Rust, SQL, TypeScript - with strong interest doing research in pure and applied Mathematics.

Write a response