shuttle-hq / eurorust-demo

Shuttle Demo for EuroRust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shuttle Demo πŸš€

This is a demo service for showcasing Shuttle.

The demo consists of two steps:

  1. Creating a "hello world" endpoint.
  2. Adding the shared database and serving static assets.

Running the Demo πŸƒ

You can visualize each change easily by going here, or by running git-history yourself in a separate terminal:

npx git-file-history src/main.rs

This will open a tab at http://localhost:5000 for browsing the code changes.

git-file-history

Then first check out the first step:

git checkout 1st-step

If this is your first time deploying the project, you will need the Shuttle CLI: cargo-shuttle.

cargo install cargo-shuttle

Then, for the initial project creation:

cargo shuttle login

# Edit Cargo.toml to change the name of the project to something unique
# like shuttle-eurorust-demo-your-name

cargo shuttle project start

You can then move forward, run/deploy the service, and checkout the next steps. If you had to change the project name, don't forget to do it again after switching branches.

git checkout <step>

cargo shuttle run

cargo shuttle deploy
Step Description Demo Branch
1st Hello World Visit http://127.0.0.1:8000 or curl it 1st-step
2nd Shared DB & Static Assets 1. Show local database being created with docker
2. Show that a database is provisioned on our platform
3. Show static assets app locally
4. Open http://127.0.0.1:8000, then add /assets to the end of the URL
5. Show that you can add and retrieve greetings from the database
2nd-step

About

Shuttle Demo for EuroRust


Languages

Language:Rust 41.3%Language:CSS 30.7%Language:JavaScript 16.2%Language:HTML 11.9%