diff --git a/.gitignore b/.gitignore index 1dcef2d..01e836e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,26 @@ node_modules -.env \ No newline at end of file +.env + +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/frontend/.gitignore b/frontend/.gitignore deleted file mode 100644 index 4d29575..0000000 --- a/frontend/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/frontend/package.json b/frontend/package.json index b9bdfec..ed6a91d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,6 @@ { "name": "frontend", "version": "0.1.0", - "proxy": "http://localhost:5000", "private": true, "dependencies": { "@reduxjs/toolkit": "^1.9.5", diff --git a/frontend/src/features/auth/authService.js b/frontend/src/features/auth/authService.js index ee8036e..9d71cfd 100644 --- a/frontend/src/features/auth/authService.js +++ b/frontend/src/features/auth/authService.js @@ -1,6 +1,6 @@ import axios from 'axios' -const API_URL = '/api/users/' +const API_URL = process.env.SERVER_URL + '/api/users/' // Register user const register = async (userData) => { diff --git a/frontend/src/features/goals/goalsService.js b/frontend/src/features/goals/goalsService.js index ec2e07f..ad22cdc 100644 --- a/frontend/src/features/goals/goalsService.js +++ b/frontend/src/features/goals/goalsService.js @@ -1,6 +1,6 @@ import axios from 'axios' -const API_URL = '/api/goals/' +const API_URL = process.env.SERVER_URL + '/api/goals/' // submit goals diff --git a/frontend/src/features/habits/habitsService.js b/frontend/src/features/habits/habitsService.js index 8090167..e5506d1 100644 --- a/frontend/src/features/habits/habitsService.js +++ b/frontend/src/features/habits/habitsService.js @@ -1,6 +1,6 @@ import axios from 'axios' -const API_URL = '/api/habits/' +const API_URL = process.env.SERVER_URL + '/api/habits/' // submit habits