mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 11:59:34 +00:00
chore(examples): update routify version to 2.x
This commit is contained in:
parent
251f986304
commit
1fdd2338f9
32 changed files with 2849 additions and 2693 deletions
11
examples/routify/api/netlify/ssr.js
Normal file
11
examples/routify/api/netlify/ssr.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
const fs = require('fs')
|
||||
const { tossr } = require('tossr')
|
||||
const { script, template } = require('./bundle.json')
|
||||
|
||||
exports.handler = async (event, context) => {
|
||||
const qs = Object.entries(event.queryStringParameters)
|
||||
.map(([key, value]) => `${key}=${value}`)
|
||||
.join('&');
|
||||
const body = await tossr(template, script, `${event.path}?${qs}`);
|
||||
return { statusCode: 200, body: body + '\n<!--ssr rendered-->' }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue