docs: add example of a server in ruby for deployment (#33418)

PR Close #33418
This commit is contained in:
TheMushr00m 2019-10-26 03:09:59 -05:00 committed by atscott
parent 64ac106248
commit 66ab701606
1 changed files with 18 additions and 0 deletions

View File

@ -231,6 +231,24 @@ modified to serve `index.html`:
}
```
* [Ruby](https://www.ruby-lang.org/): create a Ruby server using ([sinatra](http://sinatrarb.com/)) with a basic Ruby file that configures the server `server.rb`:
``` ruby
require 'sinatra'
# Folder structure
# .
# -- server.rb
# -- public
# |-- dist
# |-- index.html
get '/' do
folderDir = settings.public_folder + '/dist' # ng build output folder
send_file File.join(folderDir, 'index.html')
end
```
* [IIS](https://www.iis.net/): add a rewrite rule to `web.config`, similar to the one shown
[here](http://stackoverflow.com/a/26152011/2116927):