Update to latest code from vercel examples

This commit is contained in:
Joey Yakimowich-Payne 2023-08-09 10:09:29 -06:00
commit 12943f86e3
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
6 changed files with 2627 additions and 19 deletions

1
.gitignore vendored
View file

@ -33,3 +33,4 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
__pycache__

View file

@ -1,5 +1,5 @@
import Image from "next/image";
import Link from "next/link";
import Image from 'next/image'
import Link from 'next/link'
export default function Home() {
return (
@ -18,7 +18,7 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
By{" "}
By{' '}
<Image
src="/vercel.svg"
alt="Vercel Logo"
@ -50,7 +50,7 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{" "}
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
@ -67,7 +67,7 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{" "}
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
@ -84,7 +84,7 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{" "}
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
@ -101,7 +101,7 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{" "}
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
@ -112,5 +112,5 @@ export default function Home() {
</a>
</div>
</main>
);
)
}

View file

@ -3,14 +3,14 @@ const nextConfig = {
rewrites: async () => {
return [
{
source: "/api/:path*",
source: '/api/:path*',
destination:
process.env.NODE_ENV === "development"
? "http://127.0.0.1:8000/api/:path*"
: "/api/",
process.env.NODE_ENV === 'development'
? 'http://127.0.0.1:8000/api/:path*'
: '/api/',
},
];
]
},
};
}
module.exports = nextConfig;
module.exports = nextConfig

View file

@ -5,7 +5,7 @@
"scripts": {
"fastapi-dev": "pip3 install -r requirements.txt && python3 -m uvicorn api.index:app --reload",
"next-dev": "next dev",
"dev": "concurrently \"npm run next-dev\" \"npm run fastapi-dev\"",
"dev": "concurrently \"pnpm run next-dev\" \"pnpm run fastapi-dev\"",
"build": "next build",
"start": "next start",
"lint": "next lint"
@ -18,7 +18,7 @@
"concurrently": "^8.0.1",
"eslint": "8.41.0",
"eslint-config-next": "13.4.4",
"next": "13.4.4",
"next": "13.4.13",
"postcss": "8.4.23",
"react": "18.2.0",
"react-dom": "18.2.0",

2607
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
fastapi==0.95.2
uvicorn[standard]
fastapi==0.101.0
uvicorn[standard]