This is a demo service for showcasing Shuttle.
The demo consists of two steps:
- Creating a "hello world" endpoint.
- Adding the shared database and serving static assets.
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.
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 URL5. Show that you can add and retrieve greetings from the database |
2nd-step |