Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Allow for a network timeout of 5s (fixes #16)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Oct 12, 2019
1 parent 332f704 commit 84815a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/axios.ts
@@ -1,9 +1,10 @@
import axios from "axios";

import { baseURI } from "./const";
import { baseURI, networkTimeout } from "./const";

const req = axios.create({
baseURL: baseURI,
timeout: networkTimeout,
});

export default req;
3 changes: 3 additions & 0 deletions src/const.ts
Expand Up @@ -5,3 +5,6 @@ export const appFullName: string = "Amber Web";
export const appName: string = "amber_web";
export const appAuthor: string = "Timur Demin";
export const appHomePage: string = "https://git.tdem.in/tdemin/amber_web";

/** Network timeout (in ms) as used by Axios. */
export const networkTimeout: number = 5000;

0 comments on commit 84815a4

Please sign in to comment.