diff --git a/README.md b/README.md index a7f9f35b..a920c827 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,30 @@ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0. -## Development server +## Installation + +To set up this project, you'll need [Bun](https://bun.sh/) as your package manager. + +### 1. Install Bun + +On macOS or Linux, install Bun using Homebrew: + +``` +brew tap oven-sh/bun +brew install bun +``` + +### 2. Install dependencies + +Run the following command in the project root to install all dependencies: + +``` +bun install +``` + +--- + +## Development Server To start a local development server, run: diff --git a/src/app/core/interceptors/auth.interceptor.ts b/src/app/core/interceptors/auth.interceptor.ts index b07c44ff..daaaada8 100644 --- a/src/app/core/interceptors/auth.interceptor.ts +++ b/src/app/core/interceptors/auth.interceptor.ts @@ -2,13 +2,13 @@ import { Observable } from 'rxjs'; import { HttpEvent, HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http'; +import { environment } from 'src/environments/environment'; + export const authInterceptor: HttpInterceptorFn = ( req: HttpRequest, next: HttpHandlerFn ): Observable> => { - const authToken = 'UlO9O9GNKgVzJD7pUeY53jiQTKJ4U2znXVWNvh0KZQruoENuILx0IIYf9LoDz7Duq72EIm'; - // OBJoUomBgbUuDgQo5JoaSKNya6XaYcd0ojAX1XOLmWi6J2arQPzByxyEi81fHE60drQUWv - // UlO9O9GNKgVzJD7pUeY53jiQTKJ4U2znXVWNvh0KZQruoENuILx0IIYf9LoDz7Duq72EIm kyrylo + const authToken = environment.authToken; if (authToken) { const authReq = req.clone({ diff --git a/src/environments/environment.development.ts b/src/environments/environment.development.ts index 861bd440..930c31ff 100644 --- a/src/environments/environment.development.ts +++ b/src/environments/environment.development.ts @@ -1,7 +1,8 @@ export const environment = { production: false, - apiUrl: 'https://api.staging4.osf.io/v2', - apiDomainUrl: 'https://api.staging4.osf.io', + apiUrl: 'http://localhost:8000/v2', + apiDomainUrl: 'http://localhost:5000', shareDomainUrl: 'https://staging-share.osf.io/trove', - addonsApiUrl: 'https://addons.staging4.osf.io/v1', + addonsApiUrl: 'http://localhost:8004', + authToken: null, }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 861bd440..6ceeabd2 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,4 +4,5 @@ export const environment = { apiDomainUrl: 'https://api.staging4.osf.io', shareDomainUrl: 'https://staging-share.osf.io/trove', addonsApiUrl: 'https://addons.staging4.osf.io/v1', + authToken: null, };