Skip to content

Commit 84107eb

Browse files
author
Tristan Lee
authored
Merge pull request #136 from edgio-docs/COMSUP-320_remix
[COMSUP-320] Remix template
2 parents 033e7a4 + 521b621 commit 84107eb

File tree

187 files changed

+134659
-24601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+134659
-24601
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Deploy to Edgio
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
deploy-to-edgio:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
- run: if [ -f yarn.lock ]; then yarn install; else npm ci; fi
14+
- run: if [ -f yarn.lock ]; then yarn edgio:deploy -- --token=$EDGIO_DEPLOY_TOKEN; else npm run edgio:deploy -- --token=$EDGIO_DEPLOY_TOKEN; fi
15+
env:
16+
EDGIO_DEPLOY_TOKEN: ${{secrets.EDGIO_DEPLOY_TOKEN}}

examples/v7-astro-template/.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
4+
# generated types
5+
.astro/
6+
7+
# dependencies
8+
node_modules/
9+
10+
# logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# Edgio generated build directory
24+
.edgio
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

examples/v7-astro-template/README.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Edgio v7 Astro SSR Template
2+
3+
This template is a basic Astro SSR template powered by Edgio. You may create a new property using this template from the [Edgio Console](https://app.edg.io).
4+
5+
**Preview**: https://edgio-community-examples-v7-astro-live.edgio.link/
6+
7+
To get started with local development, run the following to install the Edgio CLI and start the development server:
8+
9+
```bash
10+
# Install the latest version of the Edgio CLI
11+
npm i -g @edgio/cli@latest
12+
13+
npm install
14+
npm run edgio:dev
15+
```
16+
17+
To test the production build locally, run the following commands:
18+
19+
```bash
20+
npm run edgio:build
21+
22+
edgio run -p
23+
```
24+
25+
When you're ready to deploy, run the following commands:
26+
27+
```bash
28+
npm run edgio:deploy
29+
```
30+
31+
---
32+
33+
# Astro Starter Kit: Basics
34+
35+
```sh
36+
npm create astro@latest -- --template basics
37+
```
38+
39+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
40+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
41+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
42+
43+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
44+
45+
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)
46+
47+
## 🚀 Project Structure
48+
49+
Inside of your Astro project, you'll see the following folders and files:
50+
51+
```text
52+
/
53+
├── public/
54+
│ └── favicon.svg
55+
├── src/
56+
│ ├── components/
57+
│ │ └── Card.astro
58+
│ ├── layouts/
59+
│ │ └── Layout.astro
60+
│ └── pages/
61+
│ └── index.astro
62+
└── package.json
63+
```
64+
65+
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
66+
67+
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
68+
69+
Any static assets, like images, can be placed in the `public/` directory.
70+
71+
## 🧞 Commands
72+
73+
All commands are run from the root of the project, from a terminal:
74+
75+
| Command | Action |
76+
| :------------------------ | :----------------------------------------------- |
77+
| `npm install` | Installs dependencies |
78+
| `npm run dev` | Starts local dev server at `localhost:4321` |
79+
| `npm run build` | Build your production site to `./dist/` |
80+
| `npm run preview` | Preview your build locally, before deploying |
81+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
82+
| `npm run astro -- --help` | Get help using the Astro CLI |
83+
84+
## 👀 Want to learn more?
85+
86+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'astro/config';
2+
3+
import node from "@astrojs/node";
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
output: 'server',
8+
adapter: node({
9+
mode: 'standalone',
10+
}),
11+
server: {
12+
host: '0.0.0.0',
13+
},
14+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// This file was automatically added by edgio init.
2+
// You should commit this file to source control.
3+
// Learn more about this file at https://docs.edg.io/guides/edgio_config
4+
const { join } = require('path');
5+
6+
module.exports = {
7+
connector: '@edgio/astro',
8+
9+
// The name of the site in Edgio to which this app should be deployed.
10+
// name: 'my-site-name',
11+
12+
// The name of the organization in Edgio to which this app should be deployed.
13+
// organization: 'my-organization-name',
14+
15+
// Overrides the default path to the routes file. The path should be relative to the root of your app.
16+
// routes: 'routes.js',
17+
18+
astro: {
19+
// The path of the standalone server that runs Astro SSR
20+
// The dependencies for this file are automatically bundled
21+
appPath: join('dist', 'server', 'entry.mjs'),
22+
},
23+
24+
// When set to true or omitted entirely, Edgio includes the deployment number in the cache key,
25+
// effectively purging the cache each time you deploy.
26+
// purgeCacheOnDeploy: false,
27+
28+
// If you need to proxy some URLs to an origin instead of your Next.js app, you can configure the origins here:
29+
// origins: [
30+
// {
31+
// // The name of the backend origin
32+
// name: "origin",
33+
//
34+
// // When provided, the following value will be sent as the host header when connecting to the origin.
35+
// // If omitted, the host header from the browser will be forwarded to the origin.
36+
// override_host_header: "test-origin.edgio.net",
37+
//
38+
// // The list of backend hosts
39+
// hosts: [
40+
// {
41+
// // The domain name or IP address of the origin server
42+
// location: "test-origin.edgio.net"
43+
// }
44+
// ]
45+
// }
46+
// ],
47+
48+
// Options for hosting serverless functions on Edgio
49+
// serverless: {
50+
// // Set to true to include all packages listed in the dependencies property of package.json when deploying to Edgio.
51+
// // This option generally isn't needed as Edgio automatically includes all modules imported by your code in the bundle that
52+
// // is uploaded during deployment
53+
// // includeNodeModules: true,
54+
//
55+
// // Include additional paths that are dynamically loaded by your app at runtime here when building the serverless bundle.
56+
// // include: ['views/**/*'],
57+
// },
58+
59+
// The maximum number of URLs that will be concurrently prerendered during deployment when static prerendering is enabled.
60+
// Defaults to 200, which is the maximum allowed value.
61+
// prerenderConcurrency: 200,
62+
63+
// A list of glob patterns identifying which prerenderConcurrency source files should be uploaded when running edgio deploy --includeSources.
64+
// This option is primarily used to share source code with Edgio support personnel for the purpose of debugging. If omitted,
65+
// edgio deploy --includeSources will result in all files which are not gitignored being uploaded to Edgio.
66+
//
67+
// sources : [
68+
// '**/*', // include all files
69+
// '!(**/secrets/**/*)', // except everything in the secrets directory
70+
// ],
71+
};

0 commit comments

Comments
 (0)