Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgdb committed Jan 3, 2020
1 parent e4be645 commit bced8dd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
10 changes: 5 additions & 5 deletions packages/backend/src/config/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"mongo": {
"host": "localhost",
"port": "27017"
}
}
"mongo": {
"host": "localhost",
"port": "27017"
}
}
11 changes: 7 additions & 4 deletions packages/backend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/config/app.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"baseURL": "http://127.0.0.1:3000/"
}
"baseURL": "http://127.0.0.1:3000/"
}
3 changes: 2 additions & 1 deletion packages/frontend/src/pages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ export default function Home({ darkTheme }) {
href={`${appConfig.baseURL}${shortenedURL}`}
target="_blank"
>
{appConfig.baseURL}{shortenedURL}
{appConfig.baseURL}
{shortenedURL}
</StyledLink>
</Paragraph3>
</HeadingLevel>
Expand Down

0 comments on commit bced8dd

Please sign in to comment.