Local Development and Hosting Resources - ml5js/Intro-ML-Arts-IMA-F24 GitHub Wiki

Running p5.js Sketches Locally

Note: You can learn about other methods on this p5.js local server Wiki page.

  1. Download and install Visual Studio Code.
  2. Install Live Server extension within Visual Studio Code.
  3. Download your p5.js sketch from the Web Editor and unzip it.
  4. Open the unzipped folder in Visual Studio Code.
  5. Select index.html file and click Go Live.

Hosting p5.js Sketches on GitHub

  1. Sign up for a GitHub account.
  2. Create a repository. [ GitHub Docs: Create a repository ]
  3. Download your p5.js sketch from the Web Editor and unzip it.
  4. Add all the files in the unzipped folder to your repository and commit the changes. [ GitHub Docs: Adding a file to a repository ]
  5. On your repository page, go to Settings > Pages:
    1. Under Source, choose Deploy from a branch.
    2. Under Branch, choose main.
    3. Click Save.
  6. Refresh the page after a while. You should see a link to your site near the top of th page once it becomes available.