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
[ EXAMPLES ] Added with-mongodb example #13028
[ EXAMPLES ] Added with-mongodb example #13028
Conversation
Co-authored-by: Shania Dhani <31454777+sdhani@users.noreply.github.com> Co-authored-by: Michelle Lucero <31500626+MichelleLucero@users.noreply.github.com> Co-authored-by: Chi Shing Lee <60354073+chislee0708@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
examples/with-mongodb/README.md
Outdated
Install [Vercel CLI](https://vercel.com/download), log in to your account from the CLI, and run the following commands to add the environment variables. Replace each variable in `<>` with your the corresponding `MONGO_URI` and `ROOT_URL` | ||
|
||
```bash | ||
now secrets add mongo_uri <MONGO_DBURI> |
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.
This can be handled by the environment UI https://vercel.com/blog/environment-variables-ui
examples/with-mongodb/README.md
Outdated
|
||
### Step 4. Set up environment variables | ||
|
||
Set `ROOT_URL` in [next.config.js](./next.config.js) to `http://localhost:3000` for quick testing locally, or set up your own development environment variables and use `process.env.ROOT_URL`. See the next.js [environement variable](https://nextjs.org/docs/api-reference/next.config.js/environment-variables) docs for more info. |
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.
This can be handled by using dotenv support: https://nextjs.org/blog/next-9-4#new-environment-variables-support
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 11.6s | 11.5s | -137ms |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Page Load Tests Overall increase ✓
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.975 | 1.997 | |
/ avg req/sec | 1265.95 | 1251.77 | -14.18 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.195 | 1.143 | -0.05 |
/error-in-render avg req/sec | 2091.5 | 2187.68 |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
index.html gzip | 928 B | 928 B | ✓ |
link.html gzip | 937 B | 937 B | ✓ |
withRouter.html gzip | 924 B | 924 B | ✓ |
Overall change | 2.79 kB | 2.79 kB | ✓ |
Serverless Mode
General
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 12.6s | 12.7s | |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_error.js | 844 kB | 844 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.81 kB | 3.81 kB | ✓ |
index.js | 844 kB | 844 kB | ✓ |
link.js | 882 kB | 882 kB | ✓ |
routerDirect.js | 874 kB | 874 kB | ✓ |
withRouter.js | 874 kB | 874 kB | ✓ |
Overall change | 4.33 MB | 4.33 MB | ✓ |
modified for dotenv and environment var setup
Thanks for the advice @timneutkens! Let me know if these are the changes you had in mind. 🙂 |
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 12s | 11.7s | -245ms |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Page Load Tests Overall increase ✓
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.02 | 2.008 | -0.01 |
/ avg req/sec | 1237.57 | 1244.88 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.24 | 1.092 | -0.15 |
/error-in-render avg req/sec | 2015.32 | 2290.28 |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
index.html gzip | 928 B | 928 B | ✓ |
link.html gzip | 937 B | 937 B | ✓ |
withRouter.html gzip | 924 B | 924 B | ✓ |
Overall change | 2.79 kB | 2.79 kB | ✓ |
Serverless Mode
General
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 12.6s | 12.6s | |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_error.js | 844 kB | 844 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.81 kB | 3.81 kB | ✓ |
index.js | 844 kB | 844 kB | ✓ |
link.js | 882 kB | 882 kB | ✓ |
routerDirect.js | 874 kB | 874 kB | ✓ |
withRouter.js | 874 kB | 874 kB | ✓ |
Overall change | 4.33 MB | 4.33 MB | ✓ |
@MichelleLucero Hi there thank you for the PR, let's do the following updates to the example:
That should do it 👍 |
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.
Requested some changes in the comment above
Stats from current PRDefault Server Mode (Decrease detected ✓)General
Page Load Tests Overall decrease
|
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.331 | 2.404 | |
/ avg req/sec | 1072.4 | 1039.99 | -32.41 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.441 | 1.666 | |
/error-in-render avg req/sec | 1734.92 | 1500.36 | -234.56 |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
index.html gzip | 928 B | 928 B | ✓ |
link.html gzip | 937 B | 937 B | ✓ |
withRouter.html gzip | 924 B | 924 B | ✓ |
Overall change | 2.79 kB | 2.79 kB | ✓ |
Serverless Mode
General
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 13.2s | 13.8s | |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_error.js | 844 kB | 844 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.81 kB | 3.81 kB | ✓ |
index.js | 844 kB | 844 kB | ✓ |
link.js | 882 kB | 882 kB | ✓ |
routerDirect.js | 874 kB | 874 kB | ✓ |
withRouter.js | 874 kB | 874 kB | ✓ |
Overall change | 4.33 MB | 4.33 MB | ✓ |
examples/with-mongodb/next.config.js
Outdated
@@ -1,8 +1,8 @@ | |||
require('dotenv').config() /* For local environment var configuration */ |
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.
This next.config.js is no longer needed.
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.
Thanks!
Awesome, we will get started on these changes and keep you all updated! |
removed extra instructions on readme, linked it to the MongoDB guides
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 11.3s | 11.4s | |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Page Load Tests Overall increase ✓
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.901 | 1.944 | |
/ avg req/sec | 1315.14 | 1285.83 | -29.31 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.121 | 1.055 | -0.07 |
/error-in-render avg req/sec | 2229.45 | 2368.84 |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
index.html gzip | 928 B | 928 B | ✓ |
link.html gzip | 937 B | 937 B | ✓ |
withRouter.html gzip | 924 B | 924 B | ✓ |
Overall change | 2.79 kB | 2.79 kB | ✓ |
Serverless Mode
General
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 12.1s | 12s | -91ms |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..fef6.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_error.js | 844 kB | 844 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.81 kB | 3.81 kB | ✓ |
index.js | 844 kB | 844 kB | ✓ |
link.js | 882 kB | 882 kB | ✓ |
routerDirect.js | 874 kB | 874 kB | ✓ |
withRouter.js | 874 kB | 874 kB | ✓ |
Overall change | 4.33 MB | 4.33 MB | ✓ |
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 11.3s | 11.4s | |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Page Load Tests Overall increase ✓
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.905 | 1.995 | |
/ avg req/sec | 1312.41 | 1253.28 | -59.13 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.152 | 1.116 | -0.04 |
/error-in-render avg req/sec | 2170.53 | 2240.87 |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.59 kB | 6.59 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..1e23.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57 kB | 57 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.67 kB | 5.67 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.5 kB | 52.5 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
index.html gzip | 927 B | 927 B | ✓ |
link.html gzip | 937 B | 937 B | ✓ |
withRouter.html gzip | 924 B | 924 B | ✓ |
Overall change | 2.79 kB | 2.79 kB | ✓ |
Serverless Mode
General
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 11.9s | 12s | |
nodeModulesSize | 61.8 MB | 61.8 MB | ✓ |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.59 kB | 6.59 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..1e23.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57 kB | 57 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.67 kB | 5.67 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.5 kB | 52.5 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_error.js | 844 kB | 844 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.81 kB | 3.81 kB | ✓ |
index.js | 844 kB | 844 kB | ✓ |
link.js | 882 kB | 882 kB | ✓ |
routerDirect.js | 874 kB | 874 kB | ✓ |
withRouter.js | 874 kB | 874 kB | ✓ |
Overall change | 4.33 MB | 4.33 MB | ✓ |
Minimal Changes
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 12s | 12s | -46ms |
nodeModulesSize | 66.4 MB | 66.4 MB | ✓ |
Page Load Tests Overall increase ✓
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.049 | 2.071 | |
/ avg req/sec | 1220.14 | 1206.86 | -13.28 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.169 | 1.144 | -0.03 |
/error-in-render avg req/sec | 2139.04 | 2185.86 |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.59 kB | 6.59 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..1e23.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57 kB | 57 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.67 kB | 5.67 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.5 kB | 52.5 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
index.html gzip | 927 B | 927 B | ✓ |
link.html gzip | 937 B | 937 B | ✓ |
withRouter.html gzip | 924 B | 924 B | ✓ |
Overall change | 2.79 kB | 2.79 kB | ✓ |
Serverless Mode
General
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
buildDuration | 12.7s | 12.7s | -33ms |
nodeModulesSize | 66.4 MB | 66.4 MB | ✓ |
Client Bundles (main, webpack, commons)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.js gzip | 6.59 kB | 6.59 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..1e23.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57 kB | 57 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.67 kB | 5.67 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.5 kB | 52.5 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.22 kB | ✓ |
Client Pages Modern
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.33 kB | ✓ |
Client Build Manifests
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles
zeit/next.js canary | hunter-college-ossd-spr-2020/next.js done-with-mongodb | Change | |
---|---|---|---|
_error.js | 844 kB | 844 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.81 kB | 3.81 kB | ✓ |
index.js | 844 kB | 844 kB | ✓ |
link.js | 882 kB | 882 kB | ✓ |
routerDirect.js | 874 kB | 874 kB | ✓ |
withRouter.js | 874 kB | 874 kB | ✓ |
Overall change | 4.33 MB | 4.33 MB | ✓ |
Minor changes to code style and logic
Made some changes to the readme and code, let me know if there are any other changes that I should make! 🙂 |
Reviewing, I'm going to update this example and then merge 😌 |
@MichelleLucero Looks like contributions are disabled for the PR, can you enable them or invite me to the repo so I can push a bunch of stuff 🙏 |
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.
Thank you for the example 💯 - I've done the following updates:
- Renamed the example to
with-mongodb-mongoose
simply because Mongoose adds a bunch of stuff and works very differently to the mongodb driver for Node.js - Updated the readme to be more clear on the steps, and I also removed the seed file and the step for it, it was very unclear to me about how to use it, so better to not have it. Free welcome to add it again in the future but with a script.
- Removed
VERCEL_URL
and updated the places that used it to access the DB directly. - Removed SSG from the edit page and replaced it with SWR as a page like that should not cache the data.
- Added a temporal vercel.json and deploy button, the deploy button will use the env defined in vercel.json to require you the environment variable before adding the deployment, soon this won't be needed and vercel.json can be removed again.
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.
Approving again after fixing the linter
* created with-mongodb, Next.js + MongoDB Co-authored-by: Shania Dhani <31454777+sdhani@users.noreply.github.com> Co-authored-by: Michelle Lucero <31500626+MichelleLucero@users.noreply.github.com> Co-authored-by: Chi Shing Lee <60354073+chislee0708@users.noreply.github.com> * Update examples/with-mongodb/README.md Co-authored-by: Tim Neutkens <tim@timneutkens.nl> * modified for dotenv and environment var setup * removed extra instructions on readme, linked it to the MongoDB guides * changes to environment var * replaced document with react logic * removed Pet header * removed isomorphic-unfetch * replaced getInitialProps with getStaticProps (SSG) * removed console log * deleted next.config.js file * fixed prettier styling * fixed link 404 server rendering issue * modified server path for delete/edit * fixed prettier styling * fixed a typo * change .env to .env.local Co-authored-by: Joe Haddad <timer150@gmail.com> * fixed typo, change .env to .env.local Co-authored-by: Joe Haddad <timer150@gmail.com> * change .env to .env.local Co-authored-by: Joe Haddad <timer150@gmail.com> * Update examples/with-mongodb/package.json Co-authored-by: Joe Haddad <timer150@gmail.com> * removed dotenv dev dependency Co-authored-by: Joe Haddad <timer150@gmail.com> * cleaned up code and instructions * Update examples/with-mongodb/.gitignore Co-authored-by: Luis Alvarez D. <luis@vercel.com> * minor changes to code style and logic * Updated index page and .env.local.example * Updated new page * Don't use SSG for the edit page * Fixed revalidation issue * Use es6 for the model * Updated edit page * Removed VERCEL_URL * Updated readme and renamed env * Added temporal vercel.json * Removed seed until added with a script * Updated package.json * Renamed example in readme * Renamed example * Lint fix Co-authored-by: liulanz <zhengliulan@gmail.com> Co-authored-by: Shania Dhani <31454777+sdhani@users.noreply.github.com> Co-authored-by: Chi Shing Lee <60354073+chislee0708@users.noreply.github.com> Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: sdhani <shania.dhani46@myhunter.cuny.edu> Co-authored-by: liulanz <37808313+liulanz@users.noreply.github.com> Co-authored-by: Joe Haddad <timer150@gmail.com> Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Example Request
My team and I created a Next.js + MongoDB example that we would like to contribute to the Next.js project. It was mentioned here.
Collaborators: