Skip to content

Commit

Permalink
feat(constants): create BASE_URL
Browse files Browse the repository at this point in the history
use BASE_URL on api.js
  • Loading branch information
aneurysmjs committed May 26, 2019
1 parent 9c320fd commit 2ec3beb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 42 deletions.
4 changes: 3 additions & 1 deletion src/app/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import axios from 'axios';

import { BASE_URL } from '@/constants';

export default axios.create({
baseURL: 'http://localhost:3000/api',
baseURL: BASE_URL,
});
40 changes: 0 additions & 40 deletions src/app/assets/json/movies.json

This file was deleted.

1 change: 0 additions & 1 deletion src/app/constants/Urls.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/app/constants/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow strict

export const BASE_URL = 'http://localhost:3000/api';

export const COUNTRIES = 'https://restcountries.eu/rest/v2';

0 comments on commit 2ec3beb

Please sign in to comment.