An open API service indexing awesome lists of open source software.

https://github.com/yoshoku/autoreload_server

Simple auto-reloading web server in Ruby
https://github.com/yoshoku/autoreload_server

autoreload gem ruby web

Last synced: 21 days ago
JSON representation

Simple auto-reloading web server in Ruby

Awesome Lists containing this project

README

          

# autoreload_server

[![Gem Version](https://badge.fury.io/rb/autoreload_server.svg)](https://badge.fury.io/rb/autoreload_server)
[![License](https://img.shields.io/badge/License-MIT-yellowgreen.svg)](https://github.com/yoshoku/autoreload_server/blob/main/LICENSE.txt)

A simple web server for local development that provides an auto-reloading feature. It automatically refreshes the browser when a file is changed.

## Installation

Install the gem and add to the application's Gemfile by executing:

```bash
bundle add autoreload_server
```

If bundler is not being used to manage dependencies, install the gem by executing:

```bash
gem install autoreload_server
```

## Usage

The `autoreload-server` command starts a web server with the specified directory as the document root.

```sh
$ ls -1 public/
index.html
$ autoreload-server public
```

Once the server is running, access http://localhost:4000/.
When you modify a file in the `public` directory, the browser will automatically reload.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/autoreload_server.
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/autoreload_server/blob/main/CODE_OF_CONDUCT.md).

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the AutoreloadServer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/autoreload_server/blob/main/CODE_OF_CONDUCT.md).
_OF_CONDUCT.md).