Package
Usually a service is more than a single hello.lua
and consists of several source files and resources. Abel uses asar (the same format used in Electron) to pack these files.
The entry point of a package is main.lua
. Abel will first load and execute main.lua
, and then load other files according to usage.
Start Packing
You can install asar according to its installation guide for now. In the future, Abel will include an asar packer by default.
Assume that you have written a service like this:
my-awesome-service/
resources/
config.json
main.lua
foo.lua
Pack those files using asar
:
$ asar pack my-awesome-service my-awesome-service.asar
The output asar file can be deployed by using field multi
:
$ curl -X PUT \
https://abel.example.com/services/my-awesome-service \
-F multi=@my-awesome-service.asar