Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
p5js-local-server [2024/02/20 21:28] renickp5js-local-server [2024/03/06 18:37] renick
Line 28: Line 28:
  
 {{:p5js-example.png?600|}} {{:p5js-example.png?600|}}
 +
 +If you want to follow along with my files, you can:
 +
 +https://editor.p5js.org/renick/sketches/m7IFTbDxm
 +
 +I'd suggest using one of your own, though!
  
 ===== install nodejs and npm ===== ===== install nodejs and npm =====
Line 52: Line 58:
  
 https://www.npmjs.com/package/http-server https://www.npmjs.com/package/http-server
 +
 +On a Mac, I recommend this process:
 +
 +  - In your Documents folder, create a folder called 'javascript'.
 +  - In that folder, run the command: npm install http-server.
 +
 +Here's a tutorial on using the terminal on a Mac: https://macpaw.com/how-to/use-terminal-on-mac
  
 ===== make a directory for your project ===== ===== make a directory for your project =====
Line 58: Line 71:
  
 {{::p5js-download.jpg?400|}} {{::p5js-download.jpg?400|}}
 +
 +I'd put this in the javascript directory that you made above.
  
 ===== put the necessary files in the directory ===== ===== put the necessary files in the directory =====
Line 90: Line 105:
     http://10.247.239.211:8080     http://10.247.239.211:8080
  
-In my case, either of these can be used. In your case, you probably have the same first choice and a different second choice. Copy one of them from YOUR case and paste it in the address bar in your browser and hit enter. You should then be able to see your sketch in the browser.+In my case, either of these can be used. In your case, you probably have the same first choice and a different second choice. Copy one of them from YOUR case and paste it in the address bar in your browser and hit enter. You should then be able to see your sketch in the browser. It looks like this for me: 
 + 
 +{{::sketch-hosted.png|}}
  • p5js-local-server.txt
  • Last modified: 4 months ago
  • by renick