Skip to content

Instantly share code, notes, and snippets.

@rjpkuyper
Last active February 17, 2023 05:43
Show Gist options
  • Save rjpkuyper/b881256c54d6cfbae8fd8ef729b39db6 to your computer and use it in GitHub Desktop.
Save rjpkuyper/b881256c54d6cfbae8fd8ef729b39db6 to your computer and use it in GitHub Desktop.
Simple example to create an URL
export enum Paths {
PRODUCTS = '/products'
}
export const createUrl = (path: Paths) => `${process.env.BASE_URL}${path}`
export const productsUrl = createUrl(Paths.PRODUCTS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment