-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add middleware support #113
Conversation
|
commit: |
feb269e
to
1debd9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few question/comment.
Great job anyway
/* Run your local dev server before starting the tests */ | ||
webServer: { | ||
command: "pnpm preview:worker", | ||
url: "http://localhost:8770", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url: "http://localhost:8770", | |
url: "http://localhost:8774", |
Update examples/middleware/package.json Co-authored-by: James Anderson <[email protected]>
middleware step
@@ -3,5 +3,6 @@ node_modules | |||
|
|||
output | |||
.worker-next |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we remove .worker-next
if it's not used anymore?
## Deploy your own | ||
|
||
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): | ||
|
||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/middleware&project-name=middleware&repository-name=middleware) | ||
|
||
## How to use | ||
|
||
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: | ||
|
||
```bash | ||
npx create-next-app --example middleware middleware-app | ||
``` | ||
|
||
```bash | ||
yarn create next-app --example middleware middleware-app | ||
``` | ||
|
||
```bash | ||
pnpm create next-app --example middleware middleware-app | ||
``` | ||
|
||
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Deploy your own | |
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): | |
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/middleware&project-name=middleware&repository-name=middleware) | |
## How to use | |
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: | |
```bash | |
npx create-next-app --example middleware middleware-app | |
``` | |
```bash | |
yarn create next-app --example middleware middleware-app | |
``` | |
```bash | |
pnpm create next-app --example middleware middleware-app | |
``` | |
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the changes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just removing the vercel specific documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🙂
It's very cool and promising seeing the integration with ona 🤩 🚀
Thanks for the reviews and the approval @dario-piotrowicz. As you noted there are still a few rough edges but they will be solved as the integration progresses - and I think those are ok in the My plan is to merge this PR and then push the changes to the experimental branch so that it's easier for users to install and test the package. |
It's missing e2e tests in the added middleware example buteverything seems to be working fine 🎉Many thanks to @conico974 for merging the required changes in
@opennextjs/aws
!Known issues as of Oct 31, 2024: