Skip to content

Wrapper around url builder to globally configure hosted resources

Notifications You must be signed in to change notification settings

MusicMapIo/resource-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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')}/>

About

Wrapper around url builder to globally configure hosted resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published