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
<b>A delightful way to building a RESTful API Services with beautiful code written in TypeScript.</b></br>
21
+
<sub>> Inspired by the awesome framework <ahref="https://laravel.com/">laravel</a> in PHP and of the repositories from <ahref="https://github.com/pleerock">pleerock</a></sub>
22
+
</p>
23
+
24
+
<br />
25
+
26
+

27
+
28
+
## ❯ Why
26
29
27
30
Our main goal with this project is a feature complete server application.
28
31
We like you to be focused on your business and not spending hours in project configuration.
29
32
30
33
Try it!! We are happy to hear your feedback or any kind of new features.
31
34
32
-
## Features
35
+
###Features
33
36
34
37
-**Beautiful Code** thanks to the awesome annotations of the libraries from [pleerock](https://github.com/pleerock).
35
38
-**Easy API Testing** with included e2e testing.
@@ -50,7 +53,9 @@ Try it!! We are happy to hear your feedback or any kind of new features.
50
53
-**GraphQL** provides as a awesome query language for our api [GraphQL](http://graphql.org/).
51
54
-**DataLoaders** helps with performance thanks to caching and batching [DataLoaders](https://github.com/facebook/dataloader).
52
55
53
-
## Table of Contents
56
+

57
+
58
+
## ❯ Table of Contents
54
59
55
60
-[Getting Started](#getting-started)
56
61
-[Scripts and Tasks](#scripts-and-tasks)
@@ -64,9 +69,11 @@ Try it!! We are happy to hear your feedback or any kind of new features.
64
69
-[Related Projects](#related-projects)
65
70
-[License](#license)
66
71
67
-
## Getting Started
72
+

68
73
69
-
### Step 1: Set up the Development Environment
74
+
## ❯ Getting Started
75
+
76
+
### Step 1: Set up the Development Environment
70
77
71
78
You need to set up your development environment before you can do anything.
72
79
@@ -112,9 +119,11 @@ npm start serve
112
119
> This starts a local server using `nodemon`, which will watch for any file changes and will restart the sever according to these changes.
113
120
> The server address will be displayed to you as `http://0.0.0.0:3000`.
114
121
115
-
## Scripts and Tasks
122
+

123
+
124
+
## ❯ Scripts and Tasks
116
125
117
-
All script are defined in the package.json file, but the most important ones are listed here.
126
+
All script are defined in the `package-scripts.js` file, but the most important ones are listed here.
118
127
119
128
### Install
120
129
@@ -158,7 +167,9 @@ All script are defined in the package.json file, but the most important ones are
158
167
To debug your code run `npm start build` or hit `cmd + b` to build your app.
159
168
Then, just set a breakpoint and hit `F5` in your Visual Studio Code.
160
169
161
-
## API Routes
170
+

171
+
172
+
## ❯ API Routes
162
173
163
174
The route prefix is `/api` by default, but you can change this in the .env file.
164
175
The swagger and the monitor route can be altered in the `.env` file.
@@ -172,7 +183,9 @@ The swagger and the monitor route can be altered in the `.env` file.
@@ -212,7 +225,9 @@ The swagger and the monitor route can be altered in the `.env` file.
212
225
| ormconfig.json | TypeORM configuration for the database. Used by seeds and the migration. (generated file) |
213
226
| mydb.sql | SQLite database for integration tests. Ignored by git and only available after integration tests |
214
227
215
-
## Logging
228
+

229
+
230
+
## ❯ Logging
216
231
217
232
Our logger is [winston](https://github.com/winstonjs/winston). To log http request we use the express middleware [morgan](https://github.com/expressjs/morgan).
218
233
We created a simple annotation to inject the logger in your service (see example below).
@@ -230,7 +245,9 @@ export class UserService {
230
245
...
231
246
```
232
247
233
-
## Event Dispatching
248
+

249
+
250
+
## ❯ Event Dispatching
234
251
235
252
Our we use this awesome repository [event-dispatch](https://github.com/pleerock/event-dispatch) for event dispatching.
236
253
We created a simple annotation to inject the EventDispatcher in your service (see example below). All events are listed in the `events.ts` file.
@@ -253,7 +270,9 @@ export class UserService {
253
270
}
254
271
```
255
272
256
-
## Seeding
273
+

274
+
275
+
## ❯ Seeding
257
276
258
277
Isn't it exhausting to create some sample data for your database, well this time is over!
259
278
@@ -367,7 +386,9 @@ npm start db.seed
367
386
| `npmstart"db.seed --seeds <path>"` | Add a different path to your seeds (Default: `src/database/seeds/`) |
368
387
| `npmstart"db.seed --config <file>"` | Path to your ormconfig.json file |
| [GraphQL Documentation](http://graphql.org/graphql-js/) | A query language for your API. |
469
492
| [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. |
470
493
471
-
## Related Projects
494
+

495
+
496
+
## ❯ Related Projects
472
497
473
498
- [Microsoft/TypeScript-Node-Starter](https://github.com/Microsoft/TypeScript-Node-Starter) - A starter template for TypeScript and Node with a detailed README describing how to use the two together.
474
499
- [express-graphql-typescript-boilerplate](https://github.com/w3tecch/express-graphql-typescript-boilerplate) - A starter kit for building amazing GraphQL API's with TypeScript and express by @w3tecch
475
500
- [aurelia-typescript-boilerplate](https://github.com/w3tecch/aurelia-typescript-boilerplate) - An Aurelia starter kit with TypeScript
476
501
- [Auth0 Mock Server](https://github.com/hirsch88/auth0-mock-server) - Useful for e2e testing or faking an oAuth server
0 commit comments