This project presents an example of how to make use of the @what3words/api
js wrapper in a browser environment.
Edit the source file variable W3W_API_KEY
located in src/what3words.js
to a valid key from your accounts dashboard. Follow the commands below as needed to run or build the project.
- To install the project dependencies, run the command
npm install
. - To build the project, run
npm run build
. - To serve the project using esbuild, run
npm run dev
.
esbuild was used to build the project with a dependency on esbuild-plugin-polyfill-node to shim node-specific features to successfully compile for browsers. You may choose to bundle your project with any appropriate tool of your choice, the only requirement as of v5.0.1
is to polyfill the node os
built-in.