1.2.9 • Published 2 years ago

medusa-plugin-ip-lookup v1.2.9

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6-rc.0

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

4 years ago

1.2.2-nxt.0

4 years ago

1.2.2-alpha.0

4 years ago

1.2.2-next.0

4 years ago

1.2.2-test.0

4 years ago

1.2.2-alp.0

4 years ago

1.2.1

4 years ago

2.0.0-next.0

4 years ago

1.2.1-next.44

4 years ago

1.2.1-next.41

4 years ago

1.2.1-next.101

4 years ago

1.2.1-next.100

4 years ago

1.2.1-next.99

4 years ago

1.2.1-next.108

4 years ago

1.2.1-next.24

4 years ago

1.2.1-nxt.129

4 years ago

1.2.1-next.27

4 years ago

1.2.1-next.26

4 years ago

1.2.1-next.35

4 years ago

1.2.1-nxt.130

4 years ago

1.2.0

4 years ago

1.1.21-next.0

4 years ago

1.2.1-next.14

4 years ago

1.1.20-next.243

4 years ago

1.1.20

4 years ago

1.1.20-dev.371

4 years ago

1.1.20-dev.377

4 years ago

1.1.20-dev.380

4 years ago

1.1.20-alpha.202

4 years ago

1.1.20-alpha.70

5 years ago

1.1.18-next.0

5 years ago

1.1.19

5 years ago

1.1.14-meilis.49

5 years ago

1.1.15-meilis.0

5 years ago

1.1.16-next.19

5 years ago

1.1.14-alpha.49

5 years ago

1.1.14-meili.49

5 years ago

1.1.14-next.51

5 years ago

1.1.14-next.52

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.14-next.48

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.9-next.16

5 years ago

1.1.9-alpha.9

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.9-next.10

5 years ago

1.1.9-next.9

5 years ago

1.1.9-next.7

5 years ago

1.1.8

5 years ago

1.1.5-next.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1-next.105

5 years ago

1.1.1-next.104

5 years ago

1.1.1-alpha.57

5 years ago

1.1.0

5 years ago

1.0.12-alpha.866

5 years ago

1.0.12-alpha.801

5 years ago

1.0.12-alpha.788

5 years ago

1.0.12-alpha.786

5 years ago

1.0.12-alpha.787

5 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-y.25

6 years ago

1.0.0-alpha.7

6 years ago

1.0.0-alpha.6

6 years ago

1.0.0-alpha.3

6 years ago

1.0.0-alpha.1

6 years ago

1.0.0-alpha.0

6 years ago

1.0.0-y.24

6 years ago

1.0.0-y.20

6 years ago

1.0.0-alpha.26

6 years ago

1.0.0-alpha.21

6 years ago