A Svelte 3 server side render example, with hashed JS and CSS chunks, using rollup and rollup-plugin-css-chunks.
git clone https://github.com/domingues/svelte-ssr-example.git
cd svelte-ssr-example
npm install
npm run build
npm run start
or
npm run start:dev
and open your browser
curl http://localhost:3000/
you can pass props in the url
curl http://localhost:3000/?props={%22size%22:64}
or submit it a POST request
curl --header "Content-Type: application/json" \
--request POST \
--data '{"size":64}' \
http://localhost:3000/
$PUBLIC_STATIC_PATH
: path where the static files will be located, local like/static
or a remote CDN like//abc.mycdn/project
;
$NODE_HOST
$NODE_PORT
MIT