Node.js
node$ liusha init hello-node --template node
Runs `npm start`; listen on `process.env.PORT`.
LocalPORT=8080 npm start
Deployliusha deploy
Envliusha secrets set KEY=valuethen read process.env.KEY after redeploy.
index.jspackage.jsonREADME.md
Python
python$ liusha init hello-python --template python
Runs `python app.py`; listen on `os.environ["PORT"]`.
LocalPORT=8080 python app.py
Deployliusha deploy
Envliusha secrets set KEY=valuethen read os.environ["KEY"] after redeploy.
app.pyrequirements.txtProcfileREADME.md
Go
go$ liusha init hello-go --template go
Buildpacks compile the server from `go.mod`; listen on `PORT`.
LocalPORT=8080 go run .
Deployliusha deploy
Envliusha secrets set KEY=valuethen read os.Getenv("KEY") after redeploy.
Java
java$ liusha init hello-java --template java
Builds with Maven and starts the packaged jar.
Localmvn package && PORT=8080 java -jar target/liusha-function-1.0.0.jar
Deployliusha deploy
Envliusha secrets set KEY=valuethen read System.getenv("KEY") after redeploy.
pom.xmlsrc/main/java/com/liusha/Function.javaProcfileREADME.md
Ruby
ruby$ liusha init hello-ruby --template ruby
Runs `ruby app.rb`; listen on `ENV["PORT"]`.
Localbundle install && PORT=8080 ruby app.rb
Deployliusha deploy
Envliusha secrets set KEY=valuethen read ENV["KEY"] after redeploy.
app.rbGemfileProcfileREADME.md
PHP
php$ liusha init hello-php --template php
Starts PHP built-in server on `PORT`.
LocalPORT=8080 sh start.sh
Deployliusha deploy
Envliusha secrets set KEY=valuethen read getenv("KEY") after redeploy.
index.phpcomposer.jsonProcfilestart.shREADME.md
Rust
rust$ liusha init hello-rust --template rust
Buildpacks compile the server from `Cargo.toml`; listen on `PORT`.
LocalPORT=8080 cargo run
Deployliusha deploy
Envliusha secrets set KEY=valuethen read std::env::var("KEY") after redeploy.
Cargo.tomlsrc/main.rsREADME.md
Existing projects
You can deploy an existing project without a template. Liusha sends runtime metadata to the API and Buildpacks still does the real source detection:
$ liusha deploy --runtime auto
$ liusha deploy --runtime go