Open mulderp opened 9 years ago
the basic server is there already and you can use it with or without an html file. For example if you have a js file with a setup and draw function defined, you can do:
p5 serve thecode.js
and it'll open up an http server that serves that file and wraps it in the necessary html.
Nice, but if I want to add more javascript to the project or include more libs (e.g. http://p5js.org/reference/#/libraries/p5.dom ) it would be nice to edit the initial html.
Also, when using sockets or other messaging stacks, e.g. from this example https://github.com/lmccart/itp-creative-js/tree/master/Spring-2014/week6/04_socket_server - a basic server template would be helpful.
Well, the init function just comes to mind, because I usually do git init
and divshot init
for hosting static files.
oh yeah for sure, just wanted to make sure you'd seen that functionality. FWIW, I think the dom and sound addons are included in the html the server generates.
Hi,
I was looking for an
init
command to start a new project. It should feel similar to a Yeoman generator providing:index.html sketch.js
and possible a basic web server for dealing with socket communication.