Skip to content
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

Example for API routes with middleware #7958

Merged
merged 1 commit into from
Jul 15, 2019
Merged

Example for API routes with middleware #7958

merged 1 commit into from
Jul 15, 2019

Conversation

huv1k
Copy link
Contributor

@huv1k huv1k commented Jul 14, 2019

This PR adds a new example for API routes with custom middleware.

@github-actions
Copy link
Contributor

Stats from current PR

Click to expand stats
zeit/next.js canary huv1k/next.js api-routes-middleware Change
Build Duration 13.8s 13.7s -140ms
node_modules Size 45.4 MB 45.4 MB ⚠️ +177 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.8 kB 68.8 kB
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.45 kB 8.45 kB
Client _error gzip Size 3.24 kB 3.24 kB
Client pages/index Size 296 B 296 B
Client pages/index gzip Size 222 B 222 B
Client pages/link Size 4.19 kB 4.19 kB
Client pages/link gzip Size 1.82 kB 1.82 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 23.7 kB 23.7 kB
Client main gzip Size 7.81 kB 7.81 kB
Client commons Size 184 kB 184 kB
Client commons gzip Size 59.7 kB 59.7 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 770 B 770 B
Base Rendered Size 1.36 kB 1.36 kB
Build Dir Size 757 kB 757 kB
Click to expand serverless stats
zeit/next.js canary huv1k/next.js api-routes-middleware Change
Build Duration 14.3s 14.4s ⚠️ +73ms
node_modules Size 45.4 MB 45.4 MB ⚠️ +177 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.8 kB 68.8 kB ⚠️ +1 B
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB -1 B
Client _error Size 8.45 kB 8.45 kB
Client _error gzip Size 3.24 kB 3.24 kB
Client pages/index Size 296 B 296 B
Client pages/index gzip Size 222 B 224 B ⚠️ +2 B
Client pages/link Size 4.19 kB 4.19 kB
Client pages/link gzip Size 1.82 kB 1.82 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 300 B -1 B
Client main Size 23.7 kB 23.7 kB
Client main gzip Size 7.81 kB 7.81 kB
Client commons Size 184 kB 184 kB
Client commons gzip Size 59.7 kB 59.7 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 770 B 770 B
Serverless pages/link Size 338 kB 338 kB
Serverless pages/link gzip Size 86.8 kB 86.8 kB -1 B
Serverless pages/index Size Error getting size Error getting size
Serverless pages/index gzip Size Error getting size Error getting size
Serverless pages/_error Size 328 kB 328 kB
Serverless pages/_error gzip Size 84 kB 84 kB -1 B
Serverless pages/routerDirect Size 329 kB 329 kB
Serverless pages/routerDirect gzip Size 84.3 kB 84.3 kB -2 B
Serverless pages/withRouter Size 329 kB 329 kB
Serverless pages/withRouter gzip Size 84.3 kB 84.3 kB
Build Dir Size 1.94 MB 1.94 MB

@vercel vercel deleted a comment from babyface1983 Jul 14, 2019
@timneutkens timneutkens merged commit be3eab2 into vercel:canary Jul 15, 2019
@Timer Timer added this to the 9.0.2 milestone Jul 15, 2019
@vercel vercel locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants