The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

ajspeller (25) [Avatar] Offline
#1
I think a section needs to be added that describes how to use ..

environment.prod.ts
environment.ts

Took me a little while to figure it out. The apiBaseUrl was set to use localhost:3000 in loc8r-data.service.ts. I ended up changing the line in the service to ..

private apiBaseUrl = environment.apiURL;


adding this import

import { environment } from './../environments/environment';


I also edited the environment.prod.ts to ...

export const environment = {
  production: true,
  apiURL: 'https://red-robin-50099.herokuapp.com/api/'
};


and environment.ts to ...

export const environment = {
  production: false,
  apiURL: 'http://localhost:3000/api/'
};