> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/button/llms.txt > Use this file to discover all available pages before exploring further. # Local development If you're using the HTML or JavaScript API, it's not possible to add the Canva Button to an HTML file on your local machine and open that file in a web browser. If you do this, you'll encounter a [Forbidden (403)](https://www.canva.dev/docs/button/troubleshooting/403-forbidden-error/) error. This is because Canva expects requests to come from: * canva.com * localhost * a domain on Canva's allowlist This guide explains how to develop locally by serving an HTML file via `localhost`. **Tip:** You can [add a domain to Canva's allowlist](https://www.canva.dev/docs/button/platform-concepts/domain-restrictions/) via the [Developer Portal](https://canva.com/developers). ## Step 1: Install `http-server` `http-server` is "a simple, zero-configuration command-line HTTP server." You can use it to make a file (or a directory of files) available via `localhost`. You can install `http-server` via npm or Homebrew. ### npm ```bash npm install http-server --global ``` ### Homebrew ```bash brew install http-server ``` **Tip:** You don't *have* to use `http-server` to start a local server. There are many other tools that serve a similar purpose. ## Step 2: Navigate into the project's directory Use the `cd` command to navigate into the directory that contains the HTML file: ```bash cd [dir_path] ``` ## Step 3: Start the local server To start the local server, run the `http-server` command: ```bash http-server ``` By default, the local server becomes available at [http://localhost:8080](http://localhost:8080). **Tip:** For a complete list of the arguments and flags that `http-server` supports, refer to [the official documentation](https://www.npmjs.com/package/http-server).