import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class ContextPathService {
  constructor() { }

  public resolvePath(path:string) {
    if (window.location.href.indexOf('localhost:4200')) {
      return `/api/${path}`;
    }
    // for future deployment on apache
    return path;
  }
}
