Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macournoyer/thin
A very fast & simple Ruby web server
https://github.com/macournoyer/thin
rack rails ruby server thin web-server
Last synced: 4 days ago
JSON representation
A very fast & simple Ruby web server
- Host: GitHub
- URL: https://github.com/macournoyer/thin
- Owner: macournoyer
- Created: 2008-01-19T05:39:04.000Z (almost 17 years ago)
- Default Branch: master
- Last Pushed: 2024-05-30T02:20:05.000Z (7 months ago)
- Last Synced: 2024-10-29T09:04:59.742Z (about 2 months ago)
- Topics: rack, rails, ruby, server, thin, web-server
- Language: Ruby
- Homepage: https://rubygems.org/gems/thin
- Size: 1.91 MB
- Stars: 2,268
- Watchers: 53
- Forks: 353
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-ruby-toolbox - Thin - A thin and fast web server (Provision, Deploy & Host / Web servers)
- montreal - macournoyer/thin - A very fast & simple Ruby web server. [Website](https://rubygems.org/gems/thin). (Projects)
README
# Thin
A small and fast Ruby web server
## Installation
```
gem install thin
```Or add `thin` to your `Gemfile`:
```ruby
gem 'thin'
```## Usage
A +thin+ script offers an easy way to start your Rack application:
```
thin start
```Browse the `example` directory for sample applications.
### CLI
Use a rackup (config.ru) file and bind to localhost port 8080:
```
thin -R config.ru -a 127.0.0.1 -p 8080 start
```Store the server process ID, log to a file and daemonize:
```
thin -p 9292 -P tmp/pids/thin.pid -l logs/thin.log -d start
```Thin is quite flexible in that many options can be specified at the command line (see `thin -h` for more).
### Configuration files
You can create a configuration file using `thin config -C config/thin.yml`.
You can then use it with all commands, such as: `thin start -C config/thin.yml`.
Here is an example config file:
```yaml
---
user: www-data
group: www-data
pid: tmp/pids/thin.pid
timeout: 30
wait: 30
log: log/thin.log
max_conns: 1024
require: []
environment: production
max_persistent_conns: 512
servers: 1
threaded: true
no-epoll: true
daemonize: true
socket: tmp/sockets/thin.sock
chdir: /path/to/your/apps/root
tag: a-name-to-show-up-in-ps aux
```## License
Ruby License, http://www.ruby-lang.org/en/LICENSE.txt.
## Credits
The parser was originally from Mongrel http://mongrel.rubyforge.org by Zed Shaw.
Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed under
the Ruby license and the GPL2.Thin is copyright Marc-Andre Cournoyer
Get help at http://groups.google.com/group/thin-ruby/
Report bugs at https://github.com/macournoyer/thin/issues
and major security issues directly to me at [email protected].