Skip to content

Local Netlify integration

Gus Burchell edited this page Mar 4, 2025 · 3 revisions

Motivation

We deploy our site with Netlify, and use Netlify Functions to do things like integrate with Prolific. To take advantage of these deployed functions locally, use the Netlify CLI.

Setup

  1. Install the Netlify CLI (https://docs.netlify.com/cli/get-started/#installation) npm install netlify-cli -g
  2. Connect Netlify CLI to your Netlify account eg netlify login
  3. Link the local project repo to the deployed Netlify repo netlify link -- I used the first option from four provided.

Usage

From the root of the website repo, run netlify dev. This will spin up a server at http://localhost:8888. Navigate to http://localhost:8888/experiment/ in your browser, and you should get a local instance of the compiler with Netlify Functions integration.

Confirmation

Check that the local site is able to connect to your Prolific account (given you have already provided EasyEyes with your API token). If the local site is unable to connect to your Prolific account you may need to troubleshoot your local Netlify CLI setup.

Clone this wiki locally