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.
- Download and install Visual Studio Code.
- Install Live Server extension within Visual Studio Code.
- Download your p5.js sketch from the Web Editor and unzip it.
- Open the unzipped folder in Visual Studio Code.
- Select
index.html
file and click Go Live.
Hosting p5.js Sketches on GitHub
- Sign up for a GitHub account.
- Create a repository. [ GitHub Docs: Create a repository ]
- Download your p5.js sketch from the Web Editor and unzip it.
- Add all the files in the unzipped folder to your repository and commit the changes. [ GitHub Docs: Adding a file to a repository ]
- On your repository page, go to Settings > Pages:
- Under Source, choose Deploy from a branch.
- Under Branch, choose main.
- Click Save.
- Refresh the page after a while. You should see a link to your site near the top of th page once it becomes available.