1.2.9 • Published 12 months ago

medusa-plugin-ip-lookup v1.2.9

Weekly downloads
4
License
MIT
Repository
github
Last release
12 months ago

ipstack (IP Lookup)

Automatically detect the region and location of your customer using ipstack.

Medusa Website | Medusa Repository

Features

  • Look up the location of your customer using ipstack.
  • Provides a middleware that can be added to any request to set the region and country of a cart.
  • Provides a service that can be used across codebase to detect the location of a user using their IP.

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-ip-lookup

2. Set the following environment variable in .env:

IPSTACK_ACCESS_KEY=<YOUR_ACCESS_KEY>

3. In medusa-config.js add the following at the end of the plugins array:

const plugins = [
  // other plugins...
  {
    resolve: `medusa-plugin-ip-lookup`,
    options: {
      access_token: process.env.IPSTACK_ACCESS_KEY,
    },
  },
]

Test the Plugin

You can use the IpLookupService service to look up the location of an IP, or use the middleware preCartCreation on any route.

1.2.9

12 months ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6-rc.0

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

3 years ago

1.2.2-nxt.0

3 years ago

1.2.2-alpha.0

3 years ago

1.2.2-next.0

3 years ago

1.2.2-test.0

3 years ago

1.2.2-alp.0

3 years ago

1.2.1

3 years ago

2.0.0-next.0

3 years ago

1.2.1-next.44

3 years ago

1.2.1-next.41

3 years ago

1.2.1-next.101

3 years ago

1.2.1-next.100

3 years ago

1.2.1-next.99

3 years ago

1.2.1-next.108

3 years ago

1.2.1-next.24

3 years ago

1.2.1-nxt.129

3 years ago

1.2.1-next.27

3 years ago

1.2.1-next.26

3 years ago

1.2.1-next.35

3 years ago

1.2.1-nxt.130

3 years ago

1.2.0

3 years ago

1.1.21-next.0

3 years ago

1.2.1-next.14

3 years ago

1.1.20-next.243

3 years ago

1.1.20

3 years ago

1.1.20-dev.371

3 years ago

1.1.20-dev.377

3 years ago

1.1.20-dev.380

3 years ago

1.1.20-alpha.202

3 years ago

1.1.20-alpha.70

4 years ago

1.1.18-next.0

4 years ago

1.1.19

4 years ago

1.1.14-meilis.49

4 years ago

1.1.15-meilis.0

4 years ago

1.1.16-next.19

4 years ago

1.1.14-alpha.49

4 years ago

1.1.14-meili.49

4 years ago

1.1.14-next.51

4 years ago

1.1.14-next.52

4 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.14-next.48

4 years ago

1.1.13

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.9-next.16

4 years ago

1.1.9-alpha.9

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.9-next.10

4 years ago

1.1.9-next.9

4 years ago

1.1.9-next.7

4 years ago

1.1.8

4 years ago

1.1.5-next.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1-next.105

4 years ago

1.1.1-next.104

4 years ago

1.1.1-alpha.57

4 years ago

1.1.0

4 years ago

1.0.12-alpha.866

4 years ago

1.0.12-alpha.801

4 years ago

1.0.12-alpha.788

4 years ago

1.0.12-alpha.786

4 years ago

1.0.12-alpha.787

4 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-y.25

5 years ago

1.0.0-alpha.7

5 years ago

1.0.0-alpha.6

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.1

5 years ago

1.0.0-alpha.0

5 years ago

1.0.0-y.24

5 years ago

1.0.0-y.20

5 years ago

1.0.0-alpha.26

5 years ago

1.0.0-alpha.21

5 years ago