This is a Next.js project bootstrapped with create-next-app
.
Local Setup:
npm install
npm run dev
- DEPLOYED AT: https://main.d2b4yulnfsl0ij.amplifyapp.com
- AWS Amplify Console: https://us-east-2.console.aws.amazon.com/amplify/home?region=us-east-2#/d2b4yulnfsl0ij
curl --location --request POST 'http://localhost:3000/api/people/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Owen",
"height": "76" ,
"mass": 195,
"hair_color": "black",
"skin_color": "white",
"eye_color": "brown",
"gender": "male"
}'
curl --location --request GET 'http://localhost:3000/api/people/'
Accessed at: http://localhost:3000/
curl --location --request GET 'http://localhost:3000/api/people/<id>'
Accessed at: http://localhost:3000/person/<id>
- need a local postgres database
postgres-> CREATE DATABASE mydatabase;
- create a .env file at root of project
DATABASE_URL="postgres://user@localhost/mydatabase"
npx prisma db push
npx prisma migrate --name name_of_migration
npx prisma db seed
npx prisma studio