I managed to render an svg animation and export its data as a JSON file (along with a JS file).
I included a JS file that renders the animation and it goes like this:
var animation = bodymovin.loadAnimation({
container: document.getElementById('anim'),
rederer: 'svg',
loop: false,
autoplay: true,
path: "data.json"
})
However when I serve the file, I get a 404 on the "data.json" file.
My terminal:
127.0.0.1 - - [08/Apr/2022 22:52:27] "GET /static/js/lottie.js HTTP/1.1" 304 -
127.0.0.1 - - [08/Apr/2022 22:52:27] "GET /static/js/script.js HTTP/1.1" 304 -
127.0.0.1 - - [08/Apr/2022 22:52:28] "GET /data.json HTTP/1.1" 404 -
It's /static/data.json unless you configured it differently.