1.2.8 • Published 8 days ago

medusa-plugin-ip-lookup v1.2.8

Weekly downloads
4
License
MIT
Repository
github
Last release
8 days 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.8

11 months ago

1.2.7

1 year ago

1.2.6-rc.0

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.2-nxt.0

2 years ago

1.2.2-alpha.0

2 years ago

1.2.2-next.0

2 years ago

1.2.2-test.0

2 years ago

1.2.2-alp.0

2 years ago

1.2.1

2 years ago

2.0.0-next.0

2 years ago

1.2.1-next.44

2 years ago

1.2.1-next.41

2 years ago

1.2.1-next.101

2 years ago

1.2.1-next.100

2 years ago

1.2.1-next.99

2 years ago

1.2.1-next.108

2 years ago

1.2.1-next.24

2 years ago

1.2.1-nxt.129

2 years ago

1.2.1-next.27

2 years ago

1.2.1-next.26

2 years ago

1.2.1-next.35

2 years ago

1.2.1-nxt.130

2 years ago

1.2.0

2 years ago

1.1.21-next.0

2 years ago

1.2.1-next.14

2 years ago

1.1.20-next.243

2 years ago

1.1.20

2 years ago

1.1.20-dev.371

2 years ago

1.1.20-dev.377

2 years ago

1.1.20-dev.380

2 years ago

1.1.20-alpha.202

2 years ago

1.1.20-alpha.70

2 years ago

1.1.18-next.0

3 years ago

1.1.19

3 years ago

1.1.14-meilis.49

3 years ago

1.1.15-meilis.0

3 years ago

1.1.16-next.19

3 years ago

1.1.14-alpha.49

3 years ago

1.1.14-meili.49

3 years ago

1.1.14-next.51

3 years ago

1.1.14-next.52

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.14-next.48

3 years ago

1.1.13

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.9-next.16

3 years ago

1.1.9-alpha.9

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.9-next.10

3 years ago

1.1.9-next.9

3 years ago

1.1.9-next.7

3 years ago

1.1.8

3 years ago

1.1.5-next.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1-next.105

3 years ago

1.1.1-next.104

3 years ago

1.1.1-alpha.57

3 years ago

1.1.0

3 years ago

1.0.12-alpha.866

3 years ago

1.0.12-alpha.801

3 years ago

1.0.12-alpha.788

3 years ago

1.0.12-alpha.786

3 years ago

1.0.12-alpha.787

3 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

1.0.0-y.25

4 years ago

1.0.0-alpha.7

4 years ago

1.0.0-alpha.6

4 years ago

1.0.0-alpha.3

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0-alpha.0

4 years ago

1.0.0-y.24

4 years ago

1.0.0-y.20

4 years ago

1.0.0-alpha.26

4 years ago

1.0.0-alpha.21

4 years ago