Skip to content

Commit

Permalink
заменила localhost на поддомен api и добавила краш тест сервера
Browse files Browse the repository at this point in the history
  • Loading branch information
olesia1205 committed Apr 27, 2023
1 parent fdf44d8 commit 29a7a78
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ const app = express();
app.use(cors());
app.use(requestLogger);

// app.get('/crash-test', () => {
// setTimeout(() => {
// throw new Error('Сервер сейчас упадёт');
// }, 0);
// });

app.post('/signup', express.json(), celebrate({
body: Joi.object().keys({
name: Joi.string().min(2).max(30),
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/utils/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ class Api {
}

const api = new Api({
baseUrl: 'http://localhost:3000/',
// baseUrl: 'http://localhost:3000/',
baseUrl: 'api.mesto.olerastova.nomoredomains.monster/',
headers: {
'Content-Type': 'application/json'
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/utils/UserAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class UserAuth {
}

const userAuth = new UserAuth({
BASE_URL: 'http://localhost:3000',
// BASE_URL: 'http://localhost:3000',
BASE_URL: 'http://api.mesto.olerastova.nomoredomains.monster',
headers: {
'Content-Type': 'application/json'
}
Expand Down

0 comments on commit 29a7a78

Please sign in to comment.