From bced8dd68fadf01f5cfc2aee5724eba3f416d211 Mon Sep 17 00:00:00 2001 From: Lucas Bittencourt Date: Fri, 3 Jan 2020 03:57:19 -0300 Subject: [PATCH] improvements --- packages/backend/src/config/app.json | 10 +++++----- packages/backend/src/index.js | 11 +++++++---- packages/frontend/src/config/app.json | 4 ++-- packages/frontend/src/pages/Home/index.js | 3 ++- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/backend/src/config/app.json b/packages/backend/src/config/app.json index d407945..3f6a0ae 100644 --- a/packages/backend/src/config/app.json +++ b/packages/backend/src/config/app.json @@ -1,6 +1,6 @@ { - "mongo": { - "host": "localhost", - "port": "27017" - } -} \ No newline at end of file + "mongo": { + "host": "localhost", + "port": "27017" + } +} diff --git a/packages/backend/src/index.js b/packages/backend/src/index.js index ba602d8..0372a37 100755 --- a/packages/backend/src/index.js +++ b/packages/backend/src/index.js @@ -5,10 +5,13 @@ const cors = require('cors'); const app = express(); const appConfig = require('./config/app.json'); -mongoose.connect(`mongodb://${appConfig.mongo.host}:${appConfig.mongo.port}/url-shortener`, { - useNewUrlParser: true, - useUnifiedTopology: true, -}); +mongoose.connect( + `mongodb://${appConfig.mongo.host}:${appConfig.mongo.port}/url-shortener`, + { + useNewUrlParser: true, + useUnifiedTopology: true, + } +); mongoose.set('useFindAndModify', false); mongoose.set('useCreateIndex', true); diff --git a/packages/frontend/src/config/app.json b/packages/frontend/src/config/app.json index d2a6ef0..2b9dc39 100644 --- a/packages/frontend/src/config/app.json +++ b/packages/frontend/src/config/app.json @@ -1,3 +1,3 @@ { - "baseURL": "http://127.0.0.1:3000/" -} \ No newline at end of file + "baseURL": "http://127.0.0.1:3000/" +} diff --git a/packages/frontend/src/pages/Home/index.js b/packages/frontend/src/pages/Home/index.js index 1df86cf..e536a3f 100644 --- a/packages/frontend/src/pages/Home/index.js +++ b/packages/frontend/src/pages/Home/index.js @@ -396,7 +396,8 @@ export default function Home({ darkTheme }) { href={`${appConfig.baseURL}${shortenedURL}`} target="_blank" > - {appConfig.baseURL}{shortenedURL} + {appConfig.baseURL} + {shortenedURL}