-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed reload command line regression (Closes #133) #134
Conversation
3567234
to
70cfaf7
Compare
I only eye balled the code and I'm pretty sure this code does not allow for URL variables on any item. I could be wrong |
Should be good now |
You don't have and most likely don't need:
Sure super glued something that works. How much time have I saved you calling you out on such poor releases? Please listen, Express 3 to 4 dropped every included middleware EXCEPT node-static for a reason. Don't be a blind I-can-do-it-all. Be an open source team player. You make us look bad when you rogue it alone just forcing an http server to work. https://www.npmjs.com/package/node-static Good luck. Open up |
Also I dont think your hand made server will work on Linux with case sensitive files... I could be wrong I could be wrong BUT write some damn tests at this point as you play with peoples minds breaking sh!t. Learn from my unit tests, I even have this awesome html5Mode that support non-hash based routing which reload does not: https://github.com/AckerApple/reload/blob/master/test/index.js |
This is a more concise way to decode your urls to paths
https://github.com/cloudhead/node-static/blob/master/lib/node-static.js#L60 That would cover things like file%20name.html Also, you might be ok on Linux with node read file taking care of the case sensitivity. Had issues myself in past |
I just reinvented the wheel and who woulda guessed, it spins. Now they have a wheel with HTTP2 protocol coming out and I gotta reinvent that on my wheel too. How do you, as a reinventor yourself (with limited time), desire to upkeep with an already existing tool that has far more specific care and support? Express was too big, you only needed to step down in dependencies. Not reinvent plus maintain |
70b10d3
to
0385f4f
Compare
@AckerApple you're right I was overthinking the serve-static thing. I have now implemented the solution with serve-static |
Great choice. Farewell good fella |
0385f4f
to
3b1a1ed
Compare
* Added serve-statics, finalhandler, and url-parse as dependencies * Handle all types of files statically with serve-static, (other than HTML and reload client file * Inject reload script tag on HTML files only * Created public/private return API so that `reloadClientCode` (among other things later on need be) could be hidden from the public return API
3b1a1ed
to
37a1c03
Compare
reloadClientCode
(among other things later on need be) could be hidden from the public return API(Closes #133)