Skip to content

Instantly share code, notes, and snippets.

@sslotsky sslotsky/apiUrl.js
Created Aug 30, 2018

What would you like to do?
export function apiUrl(endpoint) {
const url = new URL(`${endpoint}`);
url.searchParams.set("username", process.env.REACT_APP_TILL_USERNAME);
url.searchParams.set("api_key", process.env.REACT_APP_TILL_API_KEY);
return url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.