Skip to content

Latest commit

 

History

History
83 lines (57 loc) · 1.98 KB

README.md

File metadata and controls

83 lines (57 loc) · 1.98 KB

@tanu-chahal/jwt-library

Encode, decode, and validate JSON Web Tokens (JWTs) with ease.

This library provides simple and efficient methods for working with JWTs in both JavaScript and TypeScript projects.

img

See Package's Demo Application or https://jwt-library.vercel.app/

Use NPM Package

Directory Structure

NextJS Demo app in jwt-library-demo/client

NPM Package code in jwt-library

Local Setup Guide

1. Clone the Repository

First, clone the main repository to your local machine. This repository contains both the JWT library and the demo application.

git clone <repo-url>

2. Set Up the JWT Library

Navigate to the jwt-library directory to install dependencies and build the package.

cd jwt-library

2.1. Install Dependencies

Use npm to install the necessary dependencies:

npm install

2.2. Build the Package

To build the TypeScript package to generate JavaScript files in the dist folder.

npm run build

This command compiles TypeScript files into JavaScript and outputs them in the dist directory.

2.3. Run Tests

Run tests to ensure everything is working correctly.

npm test

3. Set Up the Next.js Demo Application

Navigate to the demo application's directory:

cd ../jwt-library-demo/client # from package directory
# or
cd jwt-library-demo/client # from root

3.1. Install Dependencies

Use npm to install the demo app's dependencies:

npm install

3.2. Run the Demo Application

Start the Next.js development server to view the demo application in your browser.

npm run dev

Open your browser and go to http://localhost:3000 to view the application.

Support

Feel free to set up the repossitory locally and raise issues & PRs.

Also, if you like the application kindly give the repo a star ⭐.