Skip to content

Proof of concept for NextJS implementation for Veritext rebuild.

Notifications You must be signed in to change notification settings

LaunchPadLab/nextjs_poc

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

Local Setup:

npm install
npm run dev

AWS

API

POST

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"
}'

GET

curl --location --request GET 'http://localhost:3000/api/people/'

Accessed at: http://localhost:3000/

SHOW

curl --location --request GET 'http://localhost:3000/api/people/<id>'

Accessed at: http://localhost:3000/person/<id>

PRISMA

Requirements

  • need a local postgres database
postgres-> CREATE DATABASE mydatabase;
  • create a .env file at root of project
DATABASE_URL="postgres://user@localhost/mydatabase"

Setting Up Prisma Connection

npx prisma db push

Migrate

npx prisma migrate --name name_of_migration

Seed the DB

npx prisma db seed

Prisma GUI

npx prisma studio

Resources

About

Proof of concept for NextJS implementation for Veritext rebuild.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published