0

Im running an application which is built on a laravel back end and a angular 6 front end. Currently when I try to load it from localhost it gaives the below error/errors

enter image description here

Then again the apiconnection.ts inside the services folder, has these two lines where I have commented the first line, and trying to use my localhost which prompts me the error, but when i use the first and comment the second the system works(but cant do local development)

constructor() {
    //this._apiUrl = `http://241.232.222.143/frontend/API/commercial/public/`;
    this._apiUrl = `http://localhost/commercial_workspace/front-end/public`;

and also in a following line.. the path that is mentioned in the error in chrome is also there

this._getMemberTitleUrl = `${this._apiUrl}/api/v1/commercial/member/title`;

furthermore im using a postgresql data base and the env file looks somewhat this

APP_NAME=commercial
APP_ENV=local
APP_KEY=base64:9Wfj8VgLU0YamcUK4KzefjASFJzEaArYvoX+WKK2Vq8=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost:8000

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5433
DB_DATABASE=my_commercial
DB_USERNAME=postgres
DB_PASSWORD=123
DB_PREFIX=commercial_

cananybody help me to load this site in my localhost

Sho Gum Lew
  • 329
  • 1
  • 5
  • 17
  • any expert on this sort of issues!!! – Sho Gum Lew Oct 04 '18 at 06:08
  • 1
    This is a common issue in local development. Read this thread: https://stackoverflow.com/questions/20035101/why-does-my-javascript-get-a-no-access-control-allow-origin-header-is-present, and you can install this https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en in Chrome. – wannadream Oct 04 '18 at 07:01
  • Thank sorted it out!! :) – Sho Gum Lew Oct 07 '18 at 13:42

0 Answers0