Liusha

Docs · templates

Language templates

Every template is a small HTTP server that listens on PORT. Liusha packages your source, Buildpacks detects the language, and Knative routes https://name.liusha.app to it.

$ liusha templates
$ liusha init my-api --template python
$ cd my-api
$ liusha deploy

Node.js

node
$ liusha init hello-node --template node

Runs `npm start`; listen on `process.env.PORT`.

  • index.js
  • package.json

Python

python
$ liusha init hello-python --template python

Runs `python app.py`; listen on `os.environ["PORT"]`.

  • app.py
  • requirements.txt
  • Procfile

Go

go
$ liusha init hello-go --template go

Buildpacks compile the server from `go.mod`; listen on `PORT`.

  • main.go
  • go.mod

Java

java
$ liusha init hello-java --template java

Builds with Maven and starts the packaged jar.

  • pom.xml
  • src/main/java/com/liusha/Function.java
  • Procfile

Ruby

ruby
$ liusha init hello-ruby --template ruby

Runs `ruby app.rb`; listen on `ENV["PORT"]`.

  • app.rb
  • Gemfile
  • Procfile

PHP

php
$ liusha init hello-php --template php

Starts PHP built-in server on `PORT`.

  • index.php
  • composer.json
  • Procfile
  • start.sh

Rust

rust
$ liusha init hello-rust --template rust

Buildpacks compile the server from `Cargo.toml`; listen on `PORT`.

  • Cargo.toml
  • src/main.rs

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