This is replaced by the Serverless Framework during deployment. See serverless.com/framework/docs/providers/aws/guide…
This was fairly detailed. Thanks for writing it! I still remember a time when I was searching for such a solution but there wasn't enough content available online on this topic. Even now I think only Caddy has out of the box support for this.
Richard Chou
I have questions about these two lines:
sudo echo -e '${file(./configs.js):caddyService}' | sudo tee /etc/systemd/system/caddy.service
sudo printf '${file(./configs.js):caddyFile}' | sudo tee /etc/caddy/Caddyfile
How can userdata execute javascript?