This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const baseURL = 'https://gorest.co.in/public-api' | |
const token = 'jwt-token' | |
const apiConfig = (url, method = 'get', isTokenIncluded = false, params = {}, data = {}) => { | |
if(isTokenIncluded){ | |
return { | |
url, | |
method, | |
baseURL, | |
headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Failed to minify the file using UglifyJS v3.4.3. Serving the original version. | |
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files | |
*/ | |
console.log('hello') | |
const express = require('express'); | |
const url = require('url'); | |
const cors = require('cors'); | |
const request = require('request'); |