|
| 1 | +<p align='center'> |
| 2 | + <a href="https://www.npmjs.com/package/json-api-nestjs" target="_blank"><img src="https://img.shields.io/npm/v/json-api-nestjs.svg" alt="NPM Version" /></a> |
| 3 | + <a href="https://www.npmjs.com/package/json-api-nestjs" target="_blank"><img src="https://img.shields.io/npm/l/json-api-nestjs.svg" alt="Package License" /></a> |
| 4 | + <a href="https://www.npmjs.com/package/json-api-nestjs" target="_blank"><img src="https://img.shields.io/npm/dm/json-api-nestjs.svg" alt="NPM Downloads" /></a> |
| 5 | + <a href="http://commitizen.github.io/cz-cli/" target="_blank"><img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen friendly" /></a> |
| 6 | + <img src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/klerick/397d521f54660656f2fd6195ec482581/raw/coverage-json-api.json" alt="Coverage Badge" /> |
| 7 | +</p> |
1 | 8 |
|
| 9 | +<p align="center"> |
| 10 | + Json API plugin for |
| 11 | + <a href="http://nestjs.com/" target="blank">NestJS</a> |
| 12 | + framework |
| 13 | +</p> |
| 14 | +<p> |
| 15 | + Tools to implement JSON API, such as, end point, query params, body params, validation and transformation response. |
| 16 | +</p> |
2 | 17 |
|
3 | | -# NestjsJsonApi |
| 18 | +## Description |
4 | 19 |
|
5 | | -This project was generated using [Nx](https://nx.dev). |
| 20 | +<p> |
| 21 | +This is the plugin that works upon TypeOrm library as a main database abstraction layer tool. Module automaticly generates API according to JSON API specificaton from the database structure (TypeORM entities). It support such features as requests validation based on database fields types, request filtering, endpoints exdending, data relations control and much more. Our module significantly reduces the development time of REST services by removing the need to negotiate the mechanism of client-server interaction and implementing automatic API generation without the need to write any code. |
| 22 | +</p> |
6 | 23 |
|
7 | | -<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p> |
| 24 | +## Installation |
8 | 25 |
|
9 | | -🔎 **Smart, Fast and Extensible Build System** |
| 26 | +```bash |
| 27 | +$ npm install |
| 28 | +$ npm run typeorm:run |
| 29 | +$ npm run seed:run |
| 30 | +``` |
10 | 31 |
|
11 | | -## Quick Start & Documentation |
| 32 | +## Running the example app |
12 | 33 |
|
13 | | -[Nx Documentation](https://nx.dev/getting-started/intro) |
| 34 | +```bash |
| 35 | +# build plugin |
| 36 | +$ npm run json-api-nestjs:build |
14 | 37 |
|
15 | | -[Mental model is a good starting point for those who like to understand things theoretically first.](https://nx.dev/concepts/mental-model) |
| 38 | +# dev server |
| 39 | +$ npm run example:serve |
16 | 40 |
|
17 | | -[Interactive Tutorial](https://nx.dev/getting-started/angular-tutorial) |
| 41 | +``` |
18 | 42 |
|
19 | | -## Adding capabilities to your workspace |
| 43 | +## Test |
20 | 44 |
|
21 | | -Nx supports many plugins which add capabilities for developing different types of applications and different tools. |
| 45 | +```bash |
| 46 | +# unit tests |
| 47 | +$ nx test json-api-nestjs |
22 | 48 |
|
23 | | -These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well. |
| 49 | +# test coverage |
| 50 | +$ nx test json-api-nestjs --coverage |
| 51 | +``` |
24 | 52 |
|
25 | | -Below are our core plugins: |
| 53 | +## License |
26 | 54 |
|
27 | | -- [Angular](https://angular.io) |
28 | | - - `ng add @nrwl/angular` |
29 | | -- [React](https://reactjs.org) |
30 | | - - `ng add @nrwl/react` |
31 | | -- Web (no framework frontends) |
32 | | - - `ng add @nrwl/web` |
33 | | -- [Nest](https://nestjs.com) |
34 | | - - `ng add @nrwl/nest` |
35 | | -- [Express](https://expressjs.com) |
36 | | - - `ng add @nrwl/express` |
37 | | -- [Node](https://nodejs.org) |
38 | | - - `ng add @nrwl/node` |
39 | | - |
40 | | -There are also many [community plugins](https://nx.dev/community) you could add. |
41 | | - |
42 | | -## Generate an application |
43 | | - |
44 | | -Run `ng g @nrwl/angular:app my-app` to generate an application. |
45 | | - |
46 | | -> You can use any of the plugins above to generate applications as well. |
47 | | -
|
48 | | -When using Nx, you can create multiple applications and libraries in the same workspace. |
49 | | - |
50 | | -## Generate a library |
51 | | - |
52 | | -Run `ng g @nrwl/angular:lib my-lib` to generate a library. |
53 | | - |
54 | | -> You can also use any of the plugins above to generate libraries as well. |
55 | | -
|
56 | | -Libraries are shareable across libraries and applications. They can be imported from `@nestjs-json-api/mylib`. |
57 | | - |
58 | | -## Development server |
59 | | - |
60 | | -Run `ng serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. |
61 | | - |
62 | | -## Code scaffolding |
63 | | - |
64 | | -Run `ng g component my-component --project=my-app` to generate a new component. |
65 | | - |
66 | | -## Build |
67 | | - |
68 | | -Run `ng build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. |
69 | | - |
70 | | -## Running unit tests |
71 | | - |
72 | | -Run `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io). |
73 | | - |
74 | | -Run `nx affected:test` to execute the unit tests affected by a change. |
75 | | - |
76 | | -## Running end-to-end tests |
77 | | - |
78 | | -Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io). |
79 | | - |
80 | | -Run `nx affected:e2e` to execute the end-to-end tests affected by a change. |
81 | | - |
82 | | -## Understand your workspace |
83 | | - |
84 | | -Run `nx graph` to see a diagram of the dependencies of your projects. |
85 | | - |
86 | | -## Further help |
87 | | - |
88 | | -Visit the [Nx Documentation](https://nx.dev/angular) to learn more. |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
95 | | -## ☁ Nx Cloud |
96 | | - |
97 | | -### Distributed Computation Caching & Distributed Task Execution |
98 | | - |
99 | | -<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png"></p> |
100 | | - |
101 | | -Nx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly. |
102 | | - |
103 | | -Teams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nx’s advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers. |
104 | | - |
105 | | -Visit [Nx Cloud](https://nx.app/) to learn more. |
| 55 | +The plugin is [MIT licensed](LICENSE). |
0 commit comments