APIs

Listar Pro is using API URL listar.passionui.com as default for calling APIs also Authenticate. After you has finished Installation step. So from now on you can change API URL with your system. Please do step below

Change API URL

Please open file locate: ./app/config/setting.js

Suffix API

Listar Pro – APIs

Please open file locate: ./app/api/index.js

You can define constants Suffix API url for each function or when you want develop more end point API, you also can add more suffix API in here

Network Connection

Please open file locate: ./app/services/network.js

You also can customize about connectTimeout, receiveTimeout … etc.

api.interceptors.request.use(
  (config) => {
    const token = getToken();
    if (!config.url.startsWith('http')) {
      config.url = url.format(getUrl()) + config.url;
    }
    console.log('Before Request >>>', config);
    // Add more config before request
    if (token) {
      config.headers['Authorization'] = `Bearer ${token}`;
    }
    config.timeout = 30000;
    return config;
  },
  (error) => {
    console.log('Error Request >>>', error);
    // Do something with response error
    return Promise.reject(error);
  },
);

The application is using axios for control network connection. You can refer this npm package for understand more in detail how dose it work https://www.npmjs.com/package/axios