A Nuxt 3 and Prisma url shortener.
Make sure to install the dependencies:
# yarn
yarn install
# npm
npm install
# pnpm
pnpm install --shamefully-hoist
Create an .env
file and setup the following variables:
DATABASE_URL="file:./db/dev.db"
JWT_SECRET=<your_secret_key>
Prisma config is available inside prisma/schema.prisma
. Prisma docs available here.
Initialize the database with Prisma by running npx prisma migrate dev --name init
.
The domain can be changed inside nuxt.config.ts
by editing:
// nuxt.config.ts
export default defineNuxtConfig({
runtimeConfig: {
public: {
domain: "http://localhost:3000/",
},
},
});
This app uses the Nuxt Security module with its default values. Module documentation is available here.
Start the development server on http://localhost:3000
npm run dev
Build the application for production:
npm run build
Locally preview production build:
npm run preview
Checkout the deployment documentation for more information.