Closed fijiwebdesign closed 1 year ago
This repo has educational purposes. As far as I understand, you are suggesting the student to install npm, add 4 dependencies (one of them being Express) and run a local server only so that the student doesn't have to hit F5. IMO that doesn't help learning. It might even make things unnecessarily confusing for the beginner.
This repo has educational purposes. As far as I understand, you are suggesting the student to install npm, add 4 dependencies (one of them being Express) and run a local server only so that the student doesn't have to hit F5. IMO that doesn't help learning. It might even make things unnecessarily confusing for the beginner.
The tooling is purely optional of course. It does provide an easy way to serve the examples and help the developers that extend the codebase.
I myself use VSCode with the Live Server v5.7.9 from Ritwick Dey. WebStorm has similar feature. Even python3 -m http.server
could do the jobs (apart for WebASM iirc)
So I don't need this option to have out of the box config available for a server.
I agree with the others in here about leaving the tooling out of this repo, but what we can offer is some documentation that shows how to serve directory contents in a generic way.
Can we improve the README with build instructions, maybe? I'm personally using http-server so it looks like
npm install -g http-server
cd example-dir
http-server
The python example above is also great. What do you think?
What @bsmth said - though I would link to https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server#running_a_simple_local_http_server
There is also an extension to VSCode (vscode-preview-server) that allows launching a local website in one click. (It is based on the free and open browsersync.io tool).
@teoli2003 That's cool - I wonder if it is worth adding to https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server#running_a_simple_local_http_server as well?
Almost a discussion... but pinging @schalkneethling - do you think it's worth adding a note to the 'demo' repos readmes (once we've rolled out the template files) with a couple of options to serve locally?
Hi @fijiwebdesign thanks a lot for suggesting the changes - I think there's a preference to give some documentation hints instead of adding tooling, so I'm closing this in favor of https://github.com/mdn/webaudio-examples/pull/110
If you have some feedback or suggestions, please feel free to leave it on the other pull request. Thank you :)
Added tooling to start a http server with live-reload built in