docs: add example of a server in ruby for deployment (#33418)
PR Close #33418
This commit is contained in:
parent
64ac106248
commit
66ab701606
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue