Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ gem 'capistrano-bundler'
# ed25519
gem 'ed25519'
gem 'bcrypt_pbkdf'

# For previewing public directory locally with `bin/server`
gem 'webrick'
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ GEM
net-ssh (>= 2.8.0)
ostruct
stringio (3.1.2)
webrick (1.8.2)

PLATFORMS
ruby
Expand All @@ -44,3 +45,7 @@ DEPENDENCIES
capistrano-bundler
ed25519
rdoc (>= 6.0.0.beta2)
webrick

BUNDLED WITH
2.5.17
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
* https://github.com/ruby/rurema-search
* https://github.com/rurema/generated-documents

## Previewing `public` directory locally

1. Install dependencies: `bundle install`
2. Run:
```
bin/server
```
3. Open http://localhost:8000/

## Production Environment

### Capstrano
Expand Down
6 changes: 6 additions & 0 deletions bin/server
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env ruby

require "webrick"

server = WEBrick::HTTPServer.new(Port: 8000, DocumentRoot: 'public')
server.start