Added api url to env example
This commit is contained in:
@ -15,10 +15,10 @@ npm install license-lib
|
|||||||
|
|
||||||
|
|
||||||
Environment Setup
|
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
|
```env
|
||||||
```JWT_SECRET=your_jwt_secret
|
JWT_SECRET=your_jwt_secret
|
||||||
DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
DB_NAME=license_db
|
DB_NAME=license_db
|
||||||
DB_USER_ADMIN=license_admin
|
DB_USER_ADMIN=license_admin
|
||||||
@ -26,6 +26,7 @@ DB_PASS_ADMIN=secure_admin_password
|
|||||||
DB_USER_READER=license_reader
|
DB_USER_READER=license_reader
|
||||||
DB_PASS_READER=secure_reader_password
|
DB_PASS_READER=secure_reader_password
|
||||||
JWT_SECRET=your_jwt_secret
|
JWT_SECRET=your_jwt_secret
|
||||||
|
VITE_LICENSE_API_URL=https://your.backend.url.com/api #or http://localhost:3000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// client/config.js
|
// client/config.js
|
||||||
|
|
||||||
export const CONFIG = {
|
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,
|
OFFLINE_GRACE_PERIOD_DAYS: 14,
|
||||||
};
|
};
|
||||||
|
|
@ -7,3 +7,4 @@ DB_PASS_ADMIN=secure_admin_password
|
|||||||
DB_USER_READER=license_reader
|
DB_USER_READER=license_reader
|
||||||
DB_PASS_READER=secure_read_password
|
DB_PASS_READER=secure_read_password
|
||||||
JWT_SECRET=your_jwt_secret
|
JWT_SECRET=your_jwt_secret
|
||||||
|
VITE_LICENSE_API_URL=https://your.backend.url.com/api #or http://localhost:3000
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "license-lib",
|
"name": "license-lib",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "Simple, secure licensing library for Node.js, React, and Next.js.",
|
"description": "Simple, secure licensing library for Node.js, React, and Next.js.",
|
||||||
"main": "server/index.js",
|
"main": "server/index.js",
|
||||||
"author": "Joseph Thompson <thompsonjd85#gmail.com>",
|
"author": "Joseph Thompson <thompsonjd85#gmail.com>",
|
||||||
|
Reference in New Issue
Block a user