Skip to content

Commit ab832c6

Browse files
authored
Merge pull request #98 from davellanedam/development
Development
2 parents 8aa8697 + 8034c58 commit ab832c6

File tree

5 files changed

+1453
-247
lines changed

5 files changed

+1453
-247
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v7.1.0 (July 25, 2019)
2+
3+
- Postman Collection example now included in root directory. Now /login has a test that automatically gets ans sets token. Thank you Glen! ([#92](https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton/pull/92))
4+
- NPM updated
5+
16
## v7.0.2 (July 12, 2019)
27

38
- NPM updated

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,12 @@ Once everything is set up to test API routes either use Postman or any other api
199199

200200
### Postman API example collection
201201

202-
You can import the example collection to Postman
202+
You can import the example collection to Postman. To import, click the import button located and select `postman-example.json` located within the root directory.
203203

204-
<https://www.getpostman.com/collections/d1e27b60e0ccff22a516>
204+
Go to `manage environments` to create environments for development, production, etc. On each of the environments you create you will need to:
205205

206-
If you use Postman please go to `manage environments` and then create one for each of your servers (Ex. myApi-LOCAL, myApi-PRODUCTION).
206+
1. Create a new key `authToken` and within the `/login` request this value is automatically updated after a successfull login through a script located in the `tests` tab. Each time you make a request to the API it will send `Authorization` header with the `token` value in the request, you can check this on the headers of users or cities endpoints in the Postman example.
207207

208-
On each of the environments you create you will need to:
209-
210-
1. Create a new key `authToken` with `token` value (the token you got from the login process), each time you make a request to the API it will send `Authorization` header with the token value in the request, you can check this on the headers of users or cities endpoints in the Postman example.
211208
2. Create a second key `server` with the url of your server, for development mode use <http://localhost:3000>
212209

213210
This is a REST API, so it works using the following HTTP methods:
@@ -227,7 +224,7 @@ If you need to add more routes to the project just create a new file in `/app/ro
227224

228225
### Creating new controllers
229226

230-
When you create a new controller file, try to also create another file with validations. Ex. `countries.js` `countries.validate.js` An example of this is included in the repository.
227+
When you create a new controller file, try to also create another file with validations. Ex. `countries.js` and `countries.validate.js`. An example of this is included in the repository.
231228

232229
## Bugs or improvements
233230

0 commit comments

Comments
 (0)