summaryrefslogtreecommitdiff
path: root/examples/ssr/src/pages/index.astro
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-02-14 12:48:52 -0500
committerGravatar GitHub <noreply@github.com> 2022-02-14 12:48:52 -0500
commitba5e2b5e6c20207955991775dc4aa8879331542c (patch)
tree28e68347035a534f8b56991ede570dfcf830cb01 /examples/ssr/src/pages/index.astro
parent61f438fdcbab7163bc3399e623a80d283e018371 (diff)
downloadastro-ba5e2b5e6c20207955991775dc4aa8879331542c.tar.gz
astro-ba5e2b5e6c20207955991775dc4aa8879331542c.tar.zst
astro-ba5e2b5e6c20207955991775dc4aa8879331542c.zip
Flagged SSR support (#2548)
* Checkpoint, basics are working * Add the `--experimental-ssr` flag * Adds the changeset * Fixes population of getStaticPaths results * Pass through the imported module * Route manifest test * Fix remaining tests * Fix remaining tests * Copy server assets over * Fix types * Allowing passing in the request to the Node version of App * Improve the example app * Gets CI to pass
Diffstat (limited to 'examples/ssr/src/pages/index.astro')
-rw-r--r--examples/ssr/src/pages/index.astro36
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/ssr/src/pages/index.astro b/examples/ssr/src/pages/index.astro
new file mode 100644
index 000000000..ea2c6c2f6
--- /dev/null
+++ b/examples/ssr/src/pages/index.astro
@@ -0,0 +1,36 @@
+---
+import Header from '../components/Header.astro';
+import Container from '../components/Container.astro';
+import ProductListing from '../components/ProductListing.astro';
+import { getProducts } from '../api';
+import '../styles/common.css';
+
+const products = await getProducts();
+---
+<html>
+<head>
+ <title>Online Store</title>
+ <style>
+ h1 {
+ font-size: 36px;
+ }
+
+ .product-listing-title {
+ text-align: center;
+ }
+
+ .product-listing {
+
+ }
+ </style>
+</head>
+<body>
+ <Header />
+
+ <Container tag="main">
+ <ProductListing products={products} class="product-listing">
+ <h2 class="product-listing-title" slot="title">Product Listing</h2>
+ </ProductListing>
+ </Container>
+</body>
+</html>