Examples
info
All command names are just examples, you will most likely have your own variant.
Local Development
🍪 JavaScript (Vue, React, Angular, etc.)
Practically any web project contains package.json with scripts where various commands are described for building, running, and debugging locally. It looks something like this:
...
"scripts": {
"serve": "vite",
...
- Navigate to the project directory
cd ~/path/to/your/project. - Set up the configuration for the project
tuna secrets setup. - Edit
package.jsonand add thetuna secrets runwrapper, it should look something like this:
...
"scripts": {
"serve": "tuna secrets run --watch -- vite",
...
- Run the application as usual
yarn serveornpm run serve
🐹 Go (Golang)
Go projects are usually run through go run or make:
- Navigate to the project directory
cd ~/path/to/your/project. - Run
tuna secrets setup. - Run the application with the wrapper:
tuna secrets run --watch -- go run ./cmd/server
Example Makefile:
.DEFAULT_GOAL := run
.PHONY: run
run: ### Run
@tuna secrets run --watch -- go run ./cmd/server
🦀 Rust (Rocket, Actix, etc.)
Rust projects most often use cargo:
- Navigate to the project directory
cd ~/path/to/your/project. - Run
tuna secrets setup. - Run the application with the wrapper:
tuna secrets run --watch -- cargo run
Example Makefile:
.DEFAULT_GOAL := run
.PHONY: run
run: ### Run
@tuna secrets run --watch -- cargo run
🥠 Node.js server project (Express, Fastify, etc.)
Node.js backend also usually uses package.json, for example:
...
"scripts": {
"dev": "node server.js",
...
- Navigate to the project directory
cd ~/path/to/your/project. - Set up the configuration for the project
tuna secrets setup. - Edit
package.json, adding the wrapper:
...
"scripts": {
"dev": "tuna secrets run --watch -- node server.js",
...
- Run the application
yarn devornpm run dev.
🐍 Python (Flask, Django, etc.)
Python projects are often run through python, manage.py, or Makefile.
- Navigate to the project directory
cd ~/path/to/your/project. - Set up the configuration for the project by adding the wrapper
tuna secrets setup. - Wrap the run command:
tuna secrets run --watch -- python app.py
If you have Django:
tuna secrets run --watch -- python manage.py runserver
If you have a Makefile:
.DEFAULT_GOAL := run
.PHONY: run
run: ### Run
@tuna secrets run --watch -- python manage.py runserver
- Run the application with this command.
🐘 PHP (Laravel, Symfony, etc.)
Usually the built-in PHP web server is used:
php -S localhost:8000 -t public
- Navigate to the project directory
cd ~/path/to/your/project. - Set up the configuration for the project
tuna secrets setup. - Run the server through the
tuna secrets runwrapper:
tuna secrets run --watch -- php -S localhost:8000 -t public
If you have Laravel:
tuna secrets run --watch -- php artisan serve
Example Makefile:
.DEFAULT_GOAL := run
.PHONY: run
run: ### Run
@tuna secrets run --watch -- php artisan serve
☕ Java/Kotlin (Spring Boot, Micronaut, etc.)
Such projects often use Gradle or Maven:
- Navigate to the project directory
cd ~/path/to/your/project. - Set up the configuration for the project
tuna secrets setup. - Wrap the run command:
For Gradle:
tuna secrets run --watch -- ./gradlew bootRun
For Maven:
tuna secrets run --watch -- mvn spring-boot:run
Example Makefile:
.DEFAULT_GOAL := run
.PHONY: run
run: ### Run
@tuna secrets run --watch -- mvn spring-boot:run
- Run the application as usual.