Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g33kdev/medusa-plugin-ip-lookup-maxmind
A Medusa plugin to lookup a user's country based on IP using MaxMind
https://github.com/g33kdev/medusa-plugin-ip-lookup-maxmind
Last synced: about 1 month ago
JSON representation
A Medusa plugin to lookup a user's country based on IP using MaxMind
- Host: GitHub
- URL: https://github.com/g33kdev/medusa-plugin-ip-lookup-maxmind
- Owner: g33kdev
- License: isc
- Created: 2022-10-19T06:15:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T10:34:53.000Z (about 1 year ago)
- Last Synced: 2024-08-09T20:13:37.570Z (5 months ago)
- Language: TypeScript
- Size: 6.61 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## medusa-plugin-ip-lookup-maxmind
![Medusa Hackathon 2022](docs/hackathon-banner.jpeg)
## About
### Participants
#### Steven
- GitHub - @stnguyen90
- Twitter - @stnguyen90
- Discord - BalistarDrake#3823### Description
Lookup a user's region using [MaxMind](https://www.maxmind.com/en/geoip2-services-and-databases).
### Preview
![Preview](/docs/preview.png)
## Set up this plugin
### Requirements
This plugin is made to work with MedusaJS. You can find the documentation [here](https://medusajs.com/docs/). Here's what you'll need to get started with this plugin:
- [Node.js](https://nodejs.org/en/)
- [Medusa Store](https://docs.medusajs.com/quickstart/quick-start/)### Install Project
1. Install the plugin:
```bash
npm install medusa-plugin-ip-lookup-maxmind# or
yarn add medusa-plugin-ip-lookup-maxmind
```2. Obtain a IP geolocation database file from MaxMind. You can download a GeoLite2 Free Geolocation Data [here](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data).
3. Add the plugin to your `medusa-config.js` file (inside the `plugins` array):
```js
{
resolve: `medusa-plugin-ip-lookup-maxmind`,
options: {
maxmind_db_path: "",
},
}
```