I use Teapot micro framework for my REST API server. However, if I reboot the VM Teapot does not start automatically on Image start.
What is the right way to autostart Teapot?
There are two main ways you can add startup scripts to a Pharo Image:
1) The most simple way is just to put a "startup.st" file into the directory with the Image. This file is run after the Image is loaded so any configurations can be there. So for instance Teapot start can be run from there.
2) More advanced way is to use "Smalltalk addToStartUpList: MyClass" call. This method will register "MyClass" into SessionManager startupList so that "MyClass>>startUp" class method is called on Image start.
This means that MyClass must have "startUp" method defined on the class side (where init Teapot script could be put).