Skip to content

Commit

Permalink
Merge pull request #62 from edgio-docs/v7-next-app-router
Browse files Browse the repository at this point in the history
Next 13.4 App router example
  • Loading branch information
tristanlee85 authored Jul 10, 2023
2 parents 2a6ec48 + bf5d4b0 commit d6dca33
Show file tree
Hide file tree
Showing 31 changed files with 37,292 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-examples-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ jobs:
node-version: ${{ env.NODE_VERSION }} # NODE_VERSION
registry-url: https://registry.npmjs.org/

- uses: actions/setup-python@v2
with:
python-version: 2.7
# - uses: actions/setup-python@v2
# with:
# python-version: 2.7

- name: Cache node modules
uses: actions/cache@v3
Expand Down
84 changes: 42 additions & 42 deletions examples/express/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions examples/v7-nextjs-app-router/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**NOTICE TO CONTRIBUTORS**

This repository is not actively monitored and any pull requests made to this repository will be closed/ignored.

Please submit the pull request to [edgio-docs/edgio-examples](https://github.com/edgio-docs/edgio-examples) instead.
16 changes: 16 additions & 0 deletions examples/v7-nextjs-app-router/.github/workflows/edgio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy to Edgio

on:
workflow_dispatch:
push:

jobs:
deploy-to-edgio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: if [ -f yarn.lock ]; then yarn install; else npm ci; fi
- run: if [ -f yarn.lock ]; then yarn edgio:deploy -- --token=$EDGIO_DEPLOY_TOKEN; else npm run edgio:deploy -- --token=$EDGIO_DEPLOY_TOKEN; fi
env:
EDGIO_DEPLOY_TOKEN: ${{secrets.EDGIO_DEPLOY_TOKEN}}
38 changes: 38 additions & 0 deletions examples/v7-nextjs-app-router/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# Edgio generated build directory
.edgio
39 changes: 39 additions & 0 deletions examples/v7-nextjs-app-router/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) and powered by [Edgio](https://edg.io).

## Getting Started

### Install Packages

```bash
npm install
```

### Local Development Server

```bash
npm run edgio:dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Edgio, take a look at the following resources:

- [Edgio Documentation](https://docs.edg.io) - learn about Edgio features

## Deploy on Edgio

Deploy this project on Edgio with the following command:

```bash
npm run edgio:deploy
```

Check out our [Next.js documentation](https://docs.edg.io/guides/v7/sites_frameworks/getting_started/next) for more details.

#
Loading

0 comments on commit d6dca33

Please sign in to comment.