Skip to content

Commit

Permalink
Latest Astro support
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlee85 committed Oct 5, 2023
1 parent 07a8d00 commit 5bc1c2b
Show file tree
Hide file tree
Showing 7 changed files with 5,511 additions and 18,198 deletions.
14 changes: 7 additions & 7 deletions examples/v7-astro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ npm run edgio:deploy

---

## Astro Starter Kit: Basics
# Astro Starter Kit: Basics

```
```sh
npm create astro@latest -- --template basics
```

Expand All @@ -44,11 +44,11 @@ npm create astro@latest -- --template basics
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)

### 🚀 Project Structure
## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```
```text
/
├── public/
│ └── favicon.svg
Expand All @@ -68,19 +68,19 @@ There's nothing special about `src/components/`, but that's where we like to put

Any static assets, like images, can be placed in the `public/` directory.

### 🧞 Commands
## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

### 👀 Want to learn more?
## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
9 changes: 1 addition & 8 deletions examples/v7-astro/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import { defineConfig } from 'astro/config';

import node from "@astrojs/node";

// https://astro.build/config
export default defineConfig({
output: "server",
adapter: node({
mode: "standalone"
})
});
export default defineConfig({});
67 changes: 67 additions & 0 deletions examples/v7-astro/edgio.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// This file was automatically added by edgio init.
// You should commit this file to source control.
// Learn more about this file at https://docs.edg.io/guides/edgio_config
const { join } = require('path');

module.exports = {
connector: '@edgio/astro',

// The name of the site in Edgio to which this app should be deployed.
// name: 'my-site-name',

// The name of the organization in Edgio to which this app should be deployed.
// organization: 'my-organization-name',

// Overrides the default path to the routes file. The path should be relative to the root of your app.
// routes: 'routes.js',

astro: {
// The path of the standalone server that runs Astro SSR
// The dependencies for this file are automatically bundled
appPath: join(process.cwd(), 'dist', 'server', 'entry.mjs'),
},

// If you need to proxy some URLs to an origin instead of your Next.js app, you can configure the origins here:
// origins: [
// {
// // The name of the backend origin
// name: "origin",
//
// // When provided, the following value will be sent as the host header when connecting to the origin.
// // If omitted, the host header from the browser will be forwarded to the origin.
// override_host_header: "test-origin.edgio.net",
//
// // The list of backend hosts
// hosts: [
// {
// // The domain name or IP address of the origin server
// location: "test-origin.edgio.net"
// }
// ]
// }
// ],

// Options for hosting serverless functions on Edgio
// serverless: {
// // Set to true to include all packages listed in the dependencies property of package.json when deploying to Edgio.
// // This option generally isn't needed as Edgio automatically includes all modules imported by your code in the bundle that
// // is uploaded during deployment
// includeNodeModules: true,
//
// // Include additional paths that are dynamically loaded by your app at runtime here when building the serverless bundle.
// include: ['views/**/*'],
// },

// The maximum number of URLs that will be concurrently prerendered during deployment when static prerendering is enabled.
// Defaults to 200, which is the maximum allowed value.
// prerenderConcurrency: 200,

// A list of glob patterns identifying which prerenderConcurrency source files should be uploaded when running edgio deploy --includeSources.
// This option is primarily used to share source code with Edgio support personnel for the purpose of debugging. If omitted,
// edgio deploy --includeSources will result in all files which are not gitignored being uploaded to Edgio.
//
// sources : [
// '**/*', // include all files
// '!(**/secrets/**/*)', // except everything in the secrets directory
// ],
};
Loading

0 comments on commit 5bc1c2b

Please sign in to comment.