docs: add example of a server in ruby for deployment (#33418)
PR Close #33418
This commit is contained in:
parent
64ac106248
commit
66ab701606
|
@ -230,6 +230,24 @@ modified to serve `index.html`:
|
|||
http.ListenAndServe(":"+httpPort, nil)
|
||||
}
|
||||
```
|
||||
|
||||
* [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
|
||||
|
|
Loading…
Reference in New Issue