Added api url to env example

This commit is contained in:
2025-03-19 12:21:59 -05:00
parent 6698fc52e3
commit 41bb4b2797
4 changed files with 7 additions and 5 deletions

View File

@ -15,10 +15,10 @@ npm install license-lib
Environment Setup
Create a .env file at the root with your database and JWT configuration:
Create a .env file at the root with your database, backend url and JWT configuration:
env
```JWT_SECRET=your_jwt_secret
```env
JWT_SECRET=your_jwt_secret
DB_HOST=localhost
DB_NAME=license_db
DB_USER_ADMIN=license_admin
@ -26,6 +26,7 @@ DB_PASS_ADMIN=secure_admin_password
DB_USER_READER=license_reader
DB_PASS_READER=secure_reader_password
JWT_SECRET=your_jwt_secret
VITE_LICENSE_API_URL=https://your.backend.url.com/api #or http://localhost:3000
```

View File

@ -1,7 +1,7 @@
// client/config.js
export const CONFIG = {
LICENSE_API_URL: 'http://localhost:3000', // backend API URL
LICENSE_API_URL: import.meta.env.VITE_LICENSE_API_URL || 'http://localhost:3000',
OFFLINE_GRACE_PERIOD_DAYS: 14,
};

View File

@ -7,3 +7,4 @@ DB_PASS_ADMIN=secure_admin_password
DB_USER_READER=license_reader
DB_PASS_READER=secure_read_password
JWT_SECRET=your_jwt_secret
VITE_LICENSE_API_URL=https://your.backend.url.com/api #or http://localhost:3000

View File

@ -1,6 +1,6 @@
{
"name": "license-lib",
"version": "1.0.2",
"version": "1.0.3",
"description": "Simple, secure licensing library for Node.js, React, and Next.js.",
"main": "server/index.js",
"author": "Joseph Thompson <thompsonjd85#gmail.com>",