0.1.3 • Published 2 years ago

express-fast-ip v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Express Fast IP

An express module for getting IP information using fast-geoip.

Installation

npm install express-fast-ip

Usage

Typescript

import {ip, ipInfo} from 'express-fast-ip';
import * as express from 'express';

const app = express();

app.use(ip);

app.get('/', function (req, res) {
    res.send(req.ipInfo);
});

// It is also possible to fetch ip information programatically
console.log(
    await ipInfo(),
);

Javascript

const express = require('express');
const app = express();
const {ip, ipInfo} = require('express-fast-ip');

app.use(ip);

app.get('/', function (req, res) {
    res.send(req.ipInfo);
});

// It is also possible to fetch ip information programatically
console.log(
    await ipInfo(),
);

Author

Eduardo Nuzzi eduardomnuzzi@gmail.com

Contributions

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a new feature, please send a pull request.

Credits

Huge thanks to Oyetoke Toby for implementing the code that inspired this lib.