Skip to content
/ flame Public

🔥 A Function-as-a-service template more oriented for the Web.

License

Notifications You must be signed in to change notification settings

ltgcgo/flame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightingale Flame

A Function-as-a-service template more oriented for the Web. Stream-first, async-only.

Urged by templates@openfaas/template.

Supported runtimes

  • Node.js 18+
  • Deno

Documentation

JavaScript

For JavaScript and the likes, each package only need to export a default handler.

Handler

handler(Request req, FlameDetails details): Promise<Response>

FlameDetails

class FlameDetails {
	Object remote: {
		addr: String,
		port: Number
	}
}

FlameWebSocket

class FlameWebSocket {
	socket: WebSocketServer,
	response: Response
}

globalThis.Flame

Flame {
	variant: String,
	getEnv(String key): String,
	upgradeWebSocket(Request req): FlameWebSocket
}