Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 419 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 419 Bytes

A wrapper around url to configure static resource access.

Useful in a react component so we can abstract away our static hosting

Usage

var resourceUrl = require('resource-url')

// Configure the default hostname and protocol
resourceUrl.host = 'static.musicmap.io';
resourceUrl.protocol = 'http';

// Usage in React component
<img src={resourceUrl('/client-website/active/images/eye.svg')}/>