mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
12 lines
284 B
JavaScript
12 lines
284 B
JavaScript
import axios from '../index.js';
|
|
|
|
const {GITHUB_TOKEN} = process.env;
|
|
|
|
GITHUB_TOKEN ? console.log(`[GITHUB_TOKEN OK]`) : console.warn(`[GITHUB_TOKEN is not defined]`);
|
|
|
|
export default axios.create({
|
|
headers: {
|
|
Authorization: GITHUB_TOKEN ? `token ${GITHUB_TOKEN}` : null
|
|
}
|
|
})
|