# Raxx.Static

**[Raxx]( middleware for serving static content.**

[![Hex pm](](
[![Build Status](
"Build Status")](

- [Install from](
- [Documentation available on hexdoc](
- [Raxx discussion on slack](

## Getting Started

Add routes for static assets to any server module.

defmodule MyApp.WWW do
  def start_link(config, server_options) do
    stack =
          {Raxx.Static, source: "dir/of/public/content"}
          # Other middleware
        {MyApp.WWW.Router, config}

    Ace.HTTP.Service.start_link(stack, server_options)

### Read files at compile time.

To read source files only once use `Raxx.Static.setup/1`.
This takes the same arguments as above.

@static_setup Raxx.Static.setup(source: "dir/of/public/content")

# in stack
{Raxx.Static, @static_setup}