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
Copy file name to clipboardExpand all lines: README.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,10 @@
18
18
by [w3tech](https://github.com/w3tecch)
19
19
20
20
## Why
21
-
Our main goal with this project is, that we have a feature complete server application.
22
-
So you can focus more on main product and not spending hours for a project configuration.
21
+
Our main goal with this project is a feature complete server application.
22
+
We like you to be focused on your business and not spending hours in project configuration.
23
23
24
-
Just try it out and give us some feedback or whishes for new features.
24
+
Try it!! We are happy to hear your feedback or any kind of new features.
25
25
26
26
## Features
27
27
-**Beautiful Syntax** thanks to the awesome annotations from [Inversify Express Utils](https://github.com/inversify/inversify-express-utils).
@@ -30,9 +30,10 @@ Just try it out and give us some feedback or whishes for new features.
30
30
-**Fast Database Building** with simple migration and seeding from [Knex](http://knexjs.org/).
31
31
-**Simplified Database Query** with the ORM of [Knex](http://knexjs.org/) called [Bookshelf](http://bookshelfjs.org/).
32
32
-**Clear Structure** with controllers, services, repositories, models, middlewares...
33
-
-**Easy Exception Handling** with our own simple classes. You will see.
33
+
-**Easy Exception Handling** with our own simple and easy to adopt logic. You will love it.
34
34
-**Easy Data Seeding** with our own factories.
35
-
-**Custom Commands** are also available in our setup and really easy to use.
35
+
-**Custom Commands** are also available in our setup and really easy to use or even extend.
36
+
-**Scaffolding Commands** will speed up your development tremendously as you should focus on business code and not scaffolding.
36
37
-**Smart Validation** thanks to [class-validator](https://github.com/pleerock/class-validator) with some nice annotations.
37
38
-**API Documentation** thanks to [swagger](http://swagger.io/).
38
39
-**API Monitoring** thanks to [express-status-monitor](https://github.com/RafalWilinski/express-status-monitor).
@@ -49,9 +50,9 @@ Just try it out and give us some feedback or whishes for new features.
49
50
*`fork` this repo
50
51
*`clone` your fork
51
52
*`cp .env.example .env` to copy the example .env file and enter your database connection
53
+
* Create a new database. You will find the name in the .env file.
52
54
* Run `npm run setup` or enter the following commands manually:
53
55
*`yarn install` to install all dependencies and typings.
54
-
* Create new database. You will find the name in the .env file.
55
56
*`npm run db:migrate` to create the schema.
56
57
*`npm run db:seed` to insert some test data.
57
58
*`npm run serve` to start the application.
@@ -72,18 +73,16 @@ All script are defined in the package.json file, but the most important ones are
72
73
* There is also a vscode task for this called `lint`.
73
74
74
75
### Tests
75
-
* Run the unit tests using `npm test`.
76
+
* Run the unit tests using `npm test` (There is also a vscode task for this called `test`).
76
77
* Run the black-box tests using `npm run test:black-box` and don't forget to start your application and your [Auth0 Mock Server](https://github.com/hirsch88/auth0-mock-server).
77
-
* There is also a vscode task for this called `test`.
78
78
79
79
### Running in dev mode
80
80
* Run `npm run serve` to start nodemon with ts-node, to serve the app.
81
81
* The server address will be displayed to you as `http://0.0.0.0:3000`
82
82
83
83
### Building the project and run it
84
-
* Run `npm run build` to generated all JavaScript files from the TypeScript sources. After this step you can deploy the app to any server.
85
-
* There is also a vscode task for this called `build`.
86
-
* To start the builded app use `npm start`.
84
+
* Run `npm run build` to generated all JavaScript files from the TypeScript sources. After this step you can deploy the app contained in `dist` to any server (There is also a vscode task for this called `build`).
85
+
* To start the builded app located in `dist` use `npm start`.
87
86
88
87
### Database
89
88
* Run `npm run db:migrate` to migrate schema changes to the database
@@ -95,7 +94,7 @@ All script are defined in the package.json file, but the most important ones are
95
94
* To run your own created command enter `npm run console <command-name>`.
96
95
* This list all your created commands `npm run console:help`.
97
96
98
-
### Generating Commands
97
+
### Scaffolding Commands
99
98
All the templates for the commands are located in `src/console/templates`.
100
99
101
100
*`npm run console make:resource <file>` - Generates a controller, service, requests, repo, model and a migration with CRUD operations.
@@ -120,7 +119,7 @@ $ npm run console make:model user
120
119
121
120
## IoC
122
121
Our IoC automatically looks through the `controllers`, `listeners` , `middlewares`, `services`,
123
-
`repositories` and `models` folders for files to bind to our IoC - Container, so you have nothing to do.
122
+
`repositories` and `models` folders in `src/api/`for files to bound automatically into the IoC - Container, so you have nothing to do.
124
123
125
124
**However it is very important to keep the naming right, because otherwise our IoC will not find your
126
125
created files!!**
@@ -133,8 +132,8 @@ The route prefix is `/api` by default, but you can change this in the .env file.
133
132
134
133
| Route | Description |
135
134
| ----------- | ----------- |
136
-
|**/info**| Shows us the name, description and the version of the package.json |
137
-
|**/docs**| This is the Swagger UI with our API documentation |
135
+
|**/api/info**| Shows us the name, description and the version of the package.json |
136
+
|**/api/docs**| This is the Swagger UI with our API documentation |
138
137
|**/status**| Shows a small monitor page for the server |
139
138
140
139
## Project Structure
@@ -172,9 +171,9 @@ The route prefix is `/api` by default, but you can change this in the .env file.
172
171
*[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.
173
172
*[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
174
173
*[aurelia-typescript-boilerplate](https://github.com/w3tecch/aurelia-typescript-boilerplate) - An Aurelia starter kit with TypeScript
*[Auth0 Mock Server](https://github.com/hirsch88/auth0-mock-server) - Useful for black-box testing or faking an oAuth server
176
175
177
-
## Documentations
176
+
## Documentations of our main dependencies
178
177
*[Express](https://expressjs.com/)
179
178
*[Knex](http://knexjs.org/)
180
179
*[Bookshelf](http://bookshelfjs.org/)
@@ -190,4 +189,4 @@ The route prefix is `/api` by default, but you can change this in the .env file.
190
189
[MIT](/LICENSE)
191
190
192
191
---
193
-
Made with ♥ by Gery Hirschfeld ([@GeryHirschfeld1](https://twitter.com/GeryHirschfeld1)) and [contributors](https://github.com/w3tecch/express-typescript-boilerplate/graphs/contributors)
192
+
Made with ♥ by w3tech ([w3tech](https://github.com/w3tecch)), Gery Hirschfeld ([@GeryHirschfeld1](https://twitter.com/GeryHirschfeld1)) and [contributors](https://github.com/w3tecch/express-typescript-boilerplate/graphs/contributors)
0 commit comments