Skip to content

Commit 5f7cb93

Browse files
committed
Remove Next.js
1 parent d8c3de0 commit 5f7cb93

16 files changed

+268
-3362
lines changed

Diff for: examples/v7-optimizely-edge/.eslintrc.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"extends": "next/core-web-vitals"
3-
}
1+
{}

Diff for: examples/v7-optimizely-edge/.gitignore

-17
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@
66
.pnp.js
77
.yarn/install-state.gz
88

9-
# testing
10-
/coverage
11-
12-
# next.js
13-
/.next/
14-
/out/
15-
16-
# production
17-
/build
18-
199
# misc
2010
.DS_Store
2111
*.pem
@@ -28,13 +18,6 @@ yarn-error.log*
2818
# local env files
2919
.env*.local
3020

31-
# vercel
32-
.vercel
33-
34-
# typescript
35-
*.tsbuildinfo
36-
next-env.d.ts
37-
3821
# Edgio generated build directory
3922
/.edgio
4023
/node_modules

Diff for: examples/v7-optimizely-edge/README.md

+7-50
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Edge-side Experiments with Optimizely and Next.js
1+
# Edge-side Experiments with Optimizely
22

3-
This project is a simple Next.js app that demonstrates how to use edge functions to run Optimizely experiments. The app is a Next.js starter project using server components that renders the text direction based on the experiment variant provided as a query parameter.
3+
This example demonstrates how you may use edge functions to run Optimizely experiments.
44

55
The request workflow is as follows:
66

7-
- The client makes a request to `/optimizely` which is handled by an edge function.
7+
- The client makes a request to `/` which is handled by an edge function.
88
- The edge function fetches the Optimizely experiment variant and decides which text direction to use based on the variant.
9-
- The edge function makes another fetch request to `/` - the Next.js app, with the experiment variant as the `dir` query parameter.
10-
- The Next.js app renders the page on the server with the text direction based on the query parameter.
11-
- The server-rendered page response is returned to the edge function.
9+
- The edge function makes another fetch request to the Wikipedia homepage and gets the HTML content.
10+
- The edge function modifies the HTML content to include the experiment variant and returns it to the client.
1211
- The edge function sets the experiment variant cookie and returns the page to the client.
12+
- Depending on the experiment variant, the page may render normal or mirrored based on the applied transformation.
1313

1414
## Getting Started
1515

@@ -37,47 +37,4 @@ OPTIMIZELY_SDK_KEY=...
3737
npm run edgio:dev
3838
```
3939

40-
5. Open [http://localhost:3000/optimizely](http://localhost:3000/optimizely) with your browser to see the result. This will set a cookie to ensure you remain on the experience across page navigation. Issue multiple requests using `curl` to see the experiment variant change:
41-
42-
```bash
43-
curl http://localhost:3000/optimizely | grep 'direction:'
44-
```
45-
46-
---
47-
48-
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).
49-
50-
## Getting Started
51-
52-
First, run the development server:
53-
54-
```bash
55-
npm run dev
56-
# or
57-
yarn dev
58-
# or
59-
pnpm dev
60-
# or
61-
bun dev
62-
```
63-
64-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
65-
66-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
67-
68-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
69-
70-
## Learn More
71-
72-
To learn more about Next.js, take a look at the following resources:
73-
74-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
75-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
76-
77-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
78-
79-
## Deploy on Vercel
80-
81-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
82-
83-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
40+
5. Open [http://localhost:3000/](http://localhost:3000/) with your browser to see the result. Note: The page may render normally or mirrored based on the experiment variant.

Diff for: examples/v7-optimizely-edge/next.config.js

-9
This file was deleted.

0 commit comments

Comments
 (0)