http_server_ruby
NOTE: This thing isn't secure. Don't use in Production.
This is simply for demo & learning purposes.
Usage
- Start the server:
ruby server.rb
- Open the browser and go to
http://localhost:2000/
orcurl -v http://localhost:2000
- Add a new file to
view/newfile.html
- Render the file in the browser via
http://localhost:2000/newfile.html
orcurl -v http://localhost:2000/newfile.html
Why is it not secure?
- Run
ruby server.rb
- Run
curl -v http://localhost:2000/../server.rb --path-as-is
The above command will literally return the contents of server.rb - that's bad.