For the impatient:
- Prepare an environment by either:
- Run the application
This repository contains a simple example application written using Reboot.
The Reboot '.proto' definitions
can be found in the bank-nodejs/api/ and bank-python/api/ directories while backend specific code can be
found in bank-nodejs/backend/, bank-python/backend/ and front end specific code in bank-web/.
For more information on all of the Reboot examples, please see the docs.
This method requires running VSCode on your machine: if that isn't your bag, see the other environment option below.
This repository includes a Dev Container config (more about Dev Containers) that declares all of the dependencies that you need to build and run the example. Dev Containers can be started locally with VSCode, but we recommend using GitHub's Codespaces to quickly launch the Dev Container:
- Right-click to create a Codespace in a new tab or window:
- Go to https://github.com/codespaces and click the three dots next to the codespace you just created and then click
Open in Visual Studio Code.- You can set your default editor to VSCode for codespaces to avoid this step in the future. See these instructions for more information.
Now you're ready to run the application!
Running directly on a host requires:
- A platform of either:
x86_64 Linuxwithglibc>=2.31(Ubuntu Focal and other equivalent-generation Linux distributions)arm64 or x86_64 MacOSwithMacOS>=13.0andXcode>=14.3
- Rye - A tool to manage
python,pip, andvenv.- If you are already familiar with Python virtual environments, feel free to use your tool of choice with
pyproject.toml. Python >=3.10 is required.
- If you are already familiar with Python virtual environments, feel free to use your tool of choice with
- Node.js
- Including
npm.
- Including
- Docker
- Note: the example does not run "inside of" Docker, but Docker is used to host a native support service for local development.
If you are unable to meet any of these requirements, we suggest using the VSCode and Dev Container environment discussed above.
Now you're ready to run the application!
This backend is implemented in Python and we must install its dependencies before
running it. The most notable of those dependencies is the reboot PyPI
distribution, which contains both the Reboot CLI (rbt) and the reboot
Python package.
Using rye, we can create and activate a virtualenv containing this project's dependencies (as well as fetch an appropriate Python version) using:
rye sync --no-lock
source .venv/bin/activateThen, to run the application, you can use the Reboot CLI rbt (present in the active virtualenv):
rbt dev runRunning rbt dev run will watch for file modifications and restart the
application if necessary. See the .rbtrc file for flags and
arguments that get expanded when running rbt dev run.
This backend is implemented in TS and we must install its dependencies before
running it. The most notable of those dependencies is the @reboot-dev/reboot
NPM package, which contains both the Reboot CLI (rbt) and the reboot
TS package.
npm installThen, to run the application, you can use the Reboot CLI rbt (present in the active virtualenv):
npx rbt dev runRunning npx rbt dev run will watch for file modifications and restart the
application if necessary. See the .rbtrc file for flags and
arguments that get expanded when running npx rbt dev run.
Similar to the backend, the front end has dependencies that need to be installed before running it. Open a separate terminal/shell and do:
cd bank-web/
npm install
npm startIf using VSCode, the page will load automatically. If not using VSCode, visit http://localhost:3000.