Add FastApi to work with Nextjs Api routes

This commit is contained in:
Diego Valdez 2023-05-26 09:35:06 -06:00
commit 5a3a47d1f3
7 changed files with 370 additions and 11 deletions

View file

@ -3,7 +3,9 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"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\"",
"build": "next build",
"start": "next start",
"lint": "next lint"
@ -13,6 +15,7 @@
"@types/react": "18.2.7",
"@types/react-dom": "18.2.4",
"autoprefixer": "10.4.14",
"concurrently": "^8.0.1",
"eslint": "8.41.0",
"eslint-config-next": "13.4.4",
"next": "13.4.4",