Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
patchamama committed Sep 10, 2023
1 parent e402cbc commit 82fc7cd
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 11 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Answers to [openfullstack.com](https://fullstackopen.com) course exercises from
- [Exercises 4.3.-4.7.](https://fullstackopen.com/en/part4/structure_of_backend_application_introduction_to_testing#exercises-4-3-4-7)
_Details solutions: [4.3](https://github.com/patchamama/fullstackopen-part4-bloglist/commit/0f1a759e78310de711531ed481917496e2f50ec8) | [4.4](https://github.com/patchamama/fullstackopen-part4-bloglist/commit/2585dc72841e8382123fa481aa149d19dd611482) | [4.5](https://github.com/patchamama/fullstackopen-part4-bloglist/commit/4fd94b8779e33ea32b3703a6e6a823291d247e0c) | [4.6](https://github.com/patchamama/fullstackopen-part4-bloglist/commit/c9d554cf41d5cbe5992fd2e2005564fab816d8ad) | [4.7](https://github.com/patchamama/fullstackopen-part4-bloglist/commit/27b41a689bf77cb20a9853fb4f7eaaa998262022)_

### Test can be execute:
_The exercise 4.7 was done with [lodash library](https://github.com/patchamama/fullstackopen-part4-bloglist/commit/27b41a689bf77cb20a9853fb4f7eaaa998262022) and [without additonal libraries](https://github.com/patchamama/fullstackopen-part4-bloglist/commit/e402cbc35bd3566eb016a75641c9401e53eb5a37)_

### Tests can be execute as follow:

```
npm test
Expand Down
194 changes: 191 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "Answers to part4 of fullstackopen course",
"main": "node index.js",
"scripts": {
"start": "node index.js",
"dev": "nodemon index.js",
"test": "jest --verbose",
"start": "cross-env NODE_ENV=production node index.js",
"dev": "cross-env NODE_ENV=development nodemon index.js",
"test": "cross-env NODE_ENV=test jest --verbose --runInBand",
"lint": "eslint ."
},
"repository": {
Expand All @@ -23,13 +23,15 @@
"cors": "2.8.5",
"dotenv": "16.3.1",
"express": "4.18.2",
"lodash": "^4.17.21",
"lodash": "4.17.21",
"mongoose": "7.5.0"
},
"devDependencies": {
"cross-env": "7.0.3",
"eslint": "8.49.0",
"jest": "^29.6.4",
"nodemon": "3.0.1"
"jest": "29.6.4",
"nodemon": "3.0.1",
"supertest": "6.3.3"
},
"jest": {
"testEnvironment": "node"
Expand Down
5 changes: 4 additions & 1 deletion utils/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
require('dotenv').config()

const PORT = process.env.PORT
const MONGODB_URI = process.env.MONGODB_URI
let MONGODB_URI = process.env.MONGODB_URI
if (process.env.NODE_ENV === 'test') {
MONGODB_URI = process.env.TEST_MONGODB_URI
}

module.exports = {
MONGODB_URI,
Expand Down

0 comments on commit 82fc7cd

Please sign in to comment.