2019-12-08 22:43:49 +01:00
|
|
|
#! /bin/bash
|
|
|
|
# A utility that hits your web frontend, causing the cache for JSX
|
|
|
|
# translations to be rendered. Call this after/during your installation
|
|
|
|
# so that the first web request after an installation doesn't need to
|
2023-08-20 21:35:06 +02:00
|
|
|
# warm the cache. Note that this isn't necessary if you are compiling
|
|
|
|
# JSX files for static serving via nginx.
|
2019-12-08 22:43:49 +01:00
|
|
|
|
|
|
|
cd /path/to/your/virtualenv/lib/python3.6/site-packages/bemani/frontend/static
|
|
|
|
for url in $(find -name "*.react.js" | sed 's,^\.,https://your-domain.com/jsx,'); do
|
|
|
|
echo "Priming $url..."
|
|
|
|
curl $url --silent -H 'Cache-Control: no-cache' > /dev/null
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Done!"
|