You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
by [w3tech](https://github.com/w3tecch)
22
24
23
25
## Why
@@ -40,15 +42,13 @@ Try it!! We are happy to hear your feedback or any kind of new features.
40
42
-**API Documentation** thanks to [swagger](http://swagger.io/).
41
43
-**API Monitoring** thanks to [express-status-monitor](https://github.com/RafalWilinski/express-status-monitor).
42
44
-**Integrated Testing Tool** thanks to [Jest](https://facebook.github.io/jest).
45
+
-**E2E API Testing** thanks to [supertest](https://github.com/visionmedia/supertest).
43
46
-**Basic Security Features** thanks to [Helmet](https://helmetjs.github.io/).
44
47
-**Easy event dispatching** thanks to [event-dispatch](https://github.com/pleerock/event-dispatch).
45
48
-**Fast Database Building** with simple migration from [TypeORM](https://github.com/typeorm/typeorm).
46
49
-**Easy Data Seeding** with our own factories.
47
-
48
-
### Comming soon
49
-
50
-
-**Custom Commands** are also available in our setup and really easy to use or even extend.
51
-
-**Scaffolding Commands** will speed up your development tremendously as you should focus on business code and not scaffolding.
50
+
-**GraphQL** provides as a awesome query language for our api [GraphQL](http://graphql.org/).
51
+
-**DataLoaders** helps with performance thanks to caching and batching [DataLoaders](https://github.com/facebook/dataloader).
52
52
53
53
# Table of Contents
54
54
@@ -96,7 +96,7 @@ Create a new database with the name you have in your `.env`-file.
96
96
Then setup your application environment.
97
97
98
98
```bash
99
-
npm start setup
99
+
npm run setup
100
100
```
101
101
102
102
> This installs all dependencies with yarn. After that it migrates the database and seeds some test data into it. So after that your development environment is ready to use.
@@ -128,7 +128,8 @@ All script are defined in the package.json file, but the most important ones are
128
128
### Tests
129
129
130
130
- Run the unit tests using `npm start test` (There is also a vscode task for this called `test`).
131
-
- Run the e2e tests using `npm start test:e2e` and don't forget to start your application and your [Auth0 Mock Server](https://github.com/hirsch88/auth0-mock-server).
131
+
- Run the integration tests using `npm start test:integration`.
132
+
- Run the e2e tests using `npm start test:e2e`.
132
133
133
134
### Running in dev mode
134
135
@@ -165,9 +166,11 @@ The swagger and the monitor route can be altered in the `.env` file.
165
166
| Route | Description |
166
167
| -------------- | ----------- |
167
168
|**/api**| Shows us the name, description and the version of the package.json |
169
+
|**/graphql**| Route to the graphql editor or your query/mutations requests |
168
170
|**/swagger**| This is the Swagger UI with our API documentation |
169
171
|**/monitor**| Shows a small monitor page for the server |
170
172
|**/api/users**| Example entity endpoint |
173
+
|**/api/pets**| Example entity endpoint |
171
174
172
175
## Project Structure
173
176
@@ -187,6 +190,9 @@ The swagger and the monitor route can be altered in the `.env` file.
187
190
|**src/api/services/**| Service layer |
188
191
|**src/api/subscribers/**| Event subscribers |
189
192
|**src/api/validators/**| Custom validators, which can be used in the request classes |
| [Helmet](https://helmetjs.github.io/) | Helmet helps you secure your Express apps by setting various HTTP headers. It’s not a silver bullet, but it can help! |
378
387
| [Auth0 API Documentation](https://auth0.com/docs/api/management/v2) | Authentification service |
379
388
| [Jest](http://facebook.github.io/jest/) | Delightful JavaScript Testing Library for unit and e2e tests |
389
+
| [supertest](https://github.com/visionmedia/supertest) | Super-agent driven library for testing node.js HTTP servers using a fluent API |
390
+
| [nock](https://github.com/node-nock/nock) | HTTP mocking and expectations library |
380
391
| [swagger Documentation](http://swagger.io/) | API Tool to describe and document your api. |
392
+
| [SQLite Documentation](https://www.sitepoint.com/getting-started-sqlite3-basic-commands/) | Getting Started with SQLite3 – Basic Commands. |
393
+
| [GraphQL Documentation](http://graphql.org/graphql-js/) | A query language for your API. |
394
+
| [DataLoader Documentation](https://github.com/facebook/dataloader) | DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching. |
0 commit comments