Giter VIP home page Giter VIP logo

jasonleong / nuxt-auth-jwt-prisma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeky1950/nuxt-auth-jwt-prisma

0.0 0.0 0.0 399 KB

This is a starter project for a Nuxt 3 application with JWT Auth and Prisma configured to use an SQLite Database but Prisma can also be configured to work with other databases like SQL, SQLite, MSSQL, PostgreSQL, MySQL, MongoDB and CockroachDB

TypeScript 36.74% Vue 63.26%

nuxt-auth-jwt-prisma's Introduction

Create an enviromental file and name it .env and place it in the root folder of the project. JWT_TOKEN_SECRET of your choice but for this example just paste the one below JWT_TOKEN_SECRET="PleaseChangeMe!"

Open your terminal and install the node dependencies npm i

Next run the prisma migration npx prisma migrate dev --name init

Now switch on your Nuxt server npm run dev

Register an account and then login

This current example uses SQlite as its DB source for Prisma but you can use MySQL, MSSQL, PostgreSQL, MongoDB, CockroachDB

If you want to know more about Prisma ORM visit there link here https://www.prisma.io/

The JWT Token will expire by default in 5 minutes. To change it go to jwt/index.ts on line 13 i.e 5m means 5 minutes. Read the jsonwebtoken documentation for more information (https://www.npmjs.com/package/jsonwebtoken).

nuxt-auth-jwt-prisma's People

Contributors

jeky1950 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.