Skip to content

bqhai199x/nuxt3_prisma

Repository files navigation

Setup

1. Install dependencies

npm install

2. Setup PostgreSQL Database

Make sure PostgreSQL is installed and running on your system.

Create a new database:

CREATE DATABASE nuxt_base;

3. Environment Configuration

Create .env file from the example:

cp .env.example .env

Update the .env file with your database credentials:

DATABASE_URL="postgresql://username:password@localhost:5432/nuxt_base"
JWT_SECRET="your-super-secret-jwt-key-here"
JWT_EXPIRES_IN="7d"
NUXT_SECRET_KEY="your-nuxt-secret-key-here"

4. Database Migration

Manual migration:

# Reset and migrate
npx prisma migrate reset --force
npx prisma migrate dev --name init_postgresql
npx prisma generate

Development

Start development server

npm run dev

http://localhost:3000

Database tools

# View database in Prisma Studio
npm run db:studio

# Create new migration
npx prisma migrate dev --name migration_name

# Reset database
npx prisma migrate reset

Production

Build

npm run build

Preview

npm run preview

Generate static

npm run generate

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages