https://github.com/itsdrnoob/datamonitorweb
Web utilities for Data Monitor
https://github.com/itsdrnoob/datamonitorweb
android datamonitor node
Last synced: 9 months ago
JSON representation
Web utilities for Data Monitor
- Host: GitHub
- URL: https://github.com/itsdrnoob/datamonitorweb
- Owner: itsdrnoob
- License: gpl-3.0
- Created: 2023-03-12T10:20:26.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-09T12:00:14.000Z (over 1 year ago)
- Last Synced: 2025-01-10T15:18:06.992Z (10 months ago)
- Topics: android, datamonitor, node
- Language: JavaScript
- Homepage: https://datamonitorweb.vercel.app
- Size: 468 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[]()
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
[](https://t.me/datamonitor)
[](https://datamonitorweb.vercel.app/)
# Data Monitor Web
## Introduction
Data Monitor Web contains a set of utilities to help with Data Monitor.
## Installation
1. Clone the repo:
```shell
git clone https://github.com/itsdrnoob/DataMonitorWeb.git
```
2. Switch to the working directory:
```shell
cd DataMonitorWeb
```
3. Install the required dependencies:
```shell
npm install
```
4. Create a `.env` file and add the following variables to it:
```
TOKEN =
IP_TOKEN =
```
5. Start the server:
```shell
npm start
```
## Endpoints
- ### **_`/fetchIp`_**
This endpoint accepts a GET request and returns the IP address of the requested user in a string format. On localhost it will return 127.0.0.1 if you're using IPv4
or ::1, ::ffff:127.0.0.1 if you're using IPv6.
**Request**
```javascript
GET /fetchIp
```
**Response**
```javascript
192.168.0.1
```
- ### **_`/ipLookup`_**
This endpoint accepts a GET request along with a header _`token`_ that contains the API key. If the token is valid, the endpoint returns a JSON containing the requested user's IP address, city, region, country, and network provider.
**Request**
```javascript
GET /ipLookup
```
**Response**
```json
{
"ip": "192.168.0.1",
"city": "New York",
"region": "NY",
"country": "US",
"org": "AT&T Services, Inc."
}
```
**Header**
| Field | Type | Required | Description |
|--------|--------|--------|--------|
| token | String | Yes | Specifies the access token |
## Rate Limiting
The endpoint _`/ipLookup`_ is rate-limited to prevent abuse. Users can make a maximum of 25 requests every 10 minutes. If the rate limit is exceeded, the API returns HTTP Error 429.
## Contributing
Contributions to the project are always welcome. Here are a few guidelines to help you get started:
- Fork the project and create a new branch for your changes.
- Make your changes and test them thoroughly.
- If fixing an already reported bug, make sure to mention 'Fixes #' in the desctiption.
- Submit a pull request.
## License
DataMonitorWeb is released under GPL-3.0 license. Click here for more information.
## Dependencies
Details regarding dependencies used in the project can be found in the dependencies.json file.