Skip to content

Commit 99055ab

Browse files
committed
Generate prisma & rebuild
1 parent 1c539a1 commit 99055ab

File tree

9 files changed

+650
-123
lines changed

9 files changed

+650
-123
lines changed

out_functions/next_api_test/nextJsPage.js

Lines changed: 582 additions & 121 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

out_publish/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>404: This page could not be found</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main-cbfc2a92a0825e0b63bf.js" as="script"/><link rel="preload" href="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js" as="script"/><link rel="preload" href="/_next/static/chunks/framework.1daf1ec1ecf144ee9147.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.c6a8bf6988d7f4eaa7c5.js" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app-24382224f10887fed77f.js" as="script"/></head><body><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, &quot;Segoe UI&quot;, &quot;Fira Sans&quot;, Avenir, &quot;Helvetica Neue&quot;, &quot;Lucida Grande&quot;, sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><h1 style="display:inline-block;border-right:1px solid rgba(0, 0, 0,.3);margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"8AHi3xMPrtGJr0JMsICUz","runtimeConfig":{},"nextExport":true,"isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":"404: This page could not be found"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills-fd3597f65753721f35bc.js"></script><script src="/_next/static/chunks/main-cbfc2a92a0825e0b63bf.js" async=""></script><script src="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js" async=""></script><script src="/_next/static/chunks/framework.1daf1ec1ecf144ee9147.js" async=""></script><script src="/_next/static/chunks/commons.c6a8bf6988d7f4eaa7c5.js" async=""></script><script src="/_next/static/chunks/pages/_app-24382224f10887fed77f.js" async=""></script><script src="/_next/static/8AHi3xMPrtGJr0JMsICUz/_buildManifest.js" async=""></script><script src="/_next/static/8AHi3xMPrtGJr0JMsICUz/_ssgManifest.js" async=""></script></body></html>
1+
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>404: This page could not be found</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main-cbfc2a92a0825e0b63bf.js" as="script"/><link rel="preload" href="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js" as="script"/><link rel="preload" href="/_next/static/chunks/framework.1daf1ec1ecf144ee9147.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.c6a8bf6988d7f4eaa7c5.js" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app-24382224f10887fed77f.js" as="script"/></head><body><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, &quot;Segoe UI&quot;, &quot;Fira Sans&quot;, Avenir, &quot;Helvetica Neue&quot;, &quot;Lucida Grande&quot;, sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><h1 style="display:inline-block;border-right:1px solid rgba(0, 0, 0,.3);margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"1xgunsIxeBxnC00A6Ho9p","runtimeConfig":{},"nextExport":true,"isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":"404: This page could not be found"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills-fd3597f65753721f35bc.js"></script><script src="/_next/static/chunks/main-cbfc2a92a0825e0b63bf.js" async=""></script><script src="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js" async=""></script><script src="/_next/static/chunks/framework.1daf1ec1ecf144ee9147.js" async=""></script><script src="/_next/static/chunks/commons.c6a8bf6988d7f4eaa7c5.js" async=""></script><script src="/_next/static/chunks/pages/_app-24382224f10887fed77f.js" async=""></script><script src="/_next/static/1xgunsIxeBxnC00A6Ho9p/_buildManifest.js" async=""></script><script src="/_next/static/1xgunsIxeBxnC00A6Ho9p/_ssgManifest.js" async=""></script></body></html>

out_publish/_next/static/1xgunsIxeBxnC00A6Ho9p/_buildManifest.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
self.__SSG_MANIFEST=new Set;self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()

out_publish/_next/static/TQKvYEgeGzwAy3vvZ_nLB/_buildManifest.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
self.__SSG_MANIFEST=new Set;self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()

out_publish/_next/static/ctSv2vpGyX9ZQ5pVAFpER/_buildManifest.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
self.__SSG_MANIFEST=new Set;self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()

pages/api/test.js

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
const { PrismaClient } = require("@prisma/client");
2+
const prisma = new PrismaClient();
23

34
export default async function handler(req, res) {
45
try {
5-
const prisma = new PrismaClient();
6+
await Promise.all([prisma.profile.deleteMany(), prisma.post.deleteMany()]);
7+
await prisma.user.deleteMany();
68

79
const createdUser = await prisma.user.create({
810
data: seedUser,
911
});
1012

13+
const createdUser2 = await prisma.user.create({
14+
data: seedUser2,
15+
});
16+
1117
res.statusCode = 200;
1218
res.json({ success: "true" });
1319
} catch (error) {
@@ -16,3 +22,57 @@ export default async function handler(req, res) {
1622
res.json({ error: error.message });
1723
}
1824
}
25+
26+
const seedUser = {
27+
28+
name: "Jane",
29+
profile: {
30+
create: {
31+
bio: "Health Enthusiast",
32+
},
33+
},
34+
posts: {
35+
create: [
36+
{
37+
title:
38+
"Comparing Database Types: How Database Types Evolved to Meet Different Needs",
39+
content:
40+
"https://www.prisma.io/blog/comparison-of-database-models-1iz9u29nwn37/",
41+
},
42+
{
43+
title: "Analysing Sleep Patterns: The Quantified Self",
44+
content: "https://quantifiedself.com/get-started/",
45+
},
46+
{
47+
title: "Prisma 2 Docs",
48+
content: "https://www.prisma.io/docs/",
49+
},
50+
],
51+
},
52+
};
53+
54+
const seedUser2 = {
55+
56+
name: "Toru Takemitsu",
57+
profile: {
58+
create: {
59+
bio: "Musician",
60+
},
61+
},
62+
posts: {
63+
create: [
64+
{
65+
title: "Requiem for String Orchestra",
66+
content: "",
67+
},
68+
{
69+
title: "Music of Tree",
70+
content: "",
71+
},
72+
{
73+
title: "Waves for clarinet, horn, two trombones and bass drum ",
74+
content: "",
75+
},
76+
],
77+
},
78+
};

0 commit comments

Comments
 (0)