Skip to content

Commit 15c0fee

Browse files
author
Gery Hirschfeld
authored
Merge pull request #74 from w3tecch/feature/readme
Feature/readme
2 parents b839c0e + f6ba3c8 commit 15c0fee

File tree

3 files changed

+86
-52
lines changed

3 files changed

+86
-52
lines changed

README.md

Lines changed: 86 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,43 @@
1-
# Express Typescript Boilerplate
2-
3-
[![Dependency Status](https://david-dm.org/w3tecch/express-typescript-boilerplate/status.svg?style=flat)](https://david-dm.org/w3tecch/express-typescript-boilerplate)
4-
[![Build Status](https://travis-ci.org/w3tecch/express-typescript-boilerplate.svg?branch=master)](https://travis-ci.org/w3tecch/express-typescript-boilerplate)
5-
[![Build status](https://ci.appveyor.com/api/projects/status/f8e7jdm8v58hcwpq/branch/master?svg=true&passingText=Windows%20passing&pendingText=Windows%20pending&failingText=Windows%20failing)](https://ci.appveyor.com/project/dweber019/express-typescript-boilerplate/branch/master)
6-
7-
> A delightful way to building a RESTful API Services with beautiful code written in TypeScript.
8-
> An Node.js Web-Service boilerplate/skeleton/starter-kit featuring
9-
> Inspired by the awesome framework [laravel](https://laravel.com/) in PHP and of the repositories from [pleerock](https://github.com/pleerock).
10-
[TypeScript](https://www.typescriptlang.org/),
11-
[Express](https://expressjs.com/),
12-
[Winston](https://github.com/winstonjs/winston),
13-
[Microframework](https://github.com/pleerock/microframework),
14-
[TypeDI](https://github.com/pleerock/typedi),
15-
[TypeORM](https://github.com/typeorm/typeorm),
16-
[TsLint](http://palantir.github.io/tslint/),
17-
[@types](https://www.npmjs.com/~types),
18-
[Jest](https://facebook.github.io/jest/),
19-
[Swagger](http://swagger.io/),
20-
[validatejs](https://validatejs.org/),
21-
[GraphQL](http://graphql.org/),
22-
[DataLoaders](https://github.com/facebook/dataloader),
23-
by [w3tech](https://github.com/w3tecch)
24-
25-
## Why
1+
<p align="center">
2+
<img src="./w3tec-logo.png" alt="w3tec" width="400" />
3+
</p>
4+
5+
<h1 align="center">Express Typescript Boilerplate</h1>
6+
7+
<p align="center">
8+
<a href="https://david-dm.org/w3tecch/express-typescript-boilerplate">
9+
<img src="https://david-dm.org/w3tecch/express-typescript-boilerplate/status.svg?style=flat" alt="dependency" />
10+
</a>
11+
<a href="https://travis-ci.org/w3tecch/express-typescript-boilerplate">
12+
<img src="https://travis-ci.org/w3tecch/express-typescript-boilerplate.svg?branch=master" alt="travis" />
13+
</a>
14+
<a href="https://ci.appveyor.com/project/dweber019/express-typescript-boilerplate/branch/master">
15+
<img src="https://ci.appveyor.com/api/projects/status/f8e7jdm8v58hcwpq/branch/master?svg=true&passingText=Windows%20passing&pendingText=Windows%20pending&failingText=Windows%20failing" alt="appveyor" />
16+
</a>
17+
<a href="https://stackshare.io/hirsch88/express-typescript-boilerplate">
18+
<img src="https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat" alt="StackShare" />
19+
</a>
20+
</p>
21+
22+
<p align="center">
23+
<b>A delightful way to building a RESTful API Services with beautiful code written in TypeScript.</b></br>
24+
<sub>Inspired by the awesome framework <a href="https://laravel.com/">laravel</a> in PHP and of the repositories from <a href="https://github.com/pleerock">pleerock</a></sub>
25+
</p>
26+
27+
<br />
28+
29+
> An Node.js Web-Service boilerplate/skeleton/starter-kit with TypeScript, Express, Winston, Microframework, TypeDI, TypeORM, TsLint, @types, Jest, Swagger, validatejs, GraphQL, DataLoaders, by w3tech
30+
31+
![divider](./w3tec-divider.png)
32+
33+
## ❯ Why
2634

2735
Our main goal with this project is a feature complete server application.
2836
We like you to be focused on your business and not spending hours in project configuration.
2937

3038
Try it!! We are happy to hear your feedback or any kind of new features.
3139

32-
## Features
40+
### Features
3341

3442
- **Beautiful Code** thanks to the awesome annotations of the libraries from [pleerock](https://github.com/pleerock).
3543
- **Easy API Testing** with included e2e testing.
@@ -50,23 +58,27 @@ Try it!! We are happy to hear your feedback or any kind of new features.
5058
- **GraphQL** provides as a awesome query language for our api [GraphQL](http://graphql.org/).
5159
- **DataLoaders** helps with performance thanks to caching and batching [DataLoaders](https://github.com/facebook/dataloader).
5260

53-
## Table of Contents
61+
![divider](./w3tec-divider.png)
62+
63+
## ❯ Table of Contents
5464

55-
- [Getting Started](#getting-started)
56-
- [Scripts and Tasks](#scripts-and-tasks)
57-
- [Debugger in VSCode](#debugger-in-vscode)
58-
- [API Routes](#api-routes)
59-
- [Project Structure](#project-structure)
60-
- [Logging](#logging)
61-
- [Event Dispatching](#event-dispatching)
62-
- [Seeding](#seeding)
63-
- [Further Documentations](#further-documentation)
64-
- [Related Projects](#related-projects)
65-
- [License](#license)
65+
- [Getting Started](#-getting-started)
66+
- [Scripts and Tasks](#-scripts-and-tasks)
67+
- [Debugger in VSCode](#-debugger-in-vscode)
68+
- [API Routes](#-api-routes)
69+
- [Project Structure](#-project-structure)
70+
- [Logging](#-logging)
71+
- [Event Dispatching](#-event-dispatching)
72+
- [Seeding](#-seeding)
73+
- [Further Documentations](#-further-documentation)
74+
- [Related Projects](#-related-projects)
75+
- [License](#-license)
6676

67-
## Getting Started
77+
![divider](./w3tec-divider.png)
6878

69-
### Step 1: Set up the Development Environment
79+
## ❯ Getting Started
80+
81+
### Step 1: Set up the Development Environment
7082

7183
You need to set up your development environment before you can do anything.
7284

@@ -112,9 +124,11 @@ npm start serve
112124
> This starts a local server using `nodemon`, which will watch for any file changes and will restart the sever according to these changes.
113125
> The server address will be displayed to you as `http://0.0.0.0:3000`.
114126
115-
## Scripts and Tasks
127+
![divider](./w3tec-divider.png)
128+
129+
## ❯ Scripts and Tasks
116130

117-
All script are defined in the package.json file, but the most important ones are listed here.
131+
All script are defined in the `package-scripts.js` file, but the most important ones are listed here.
118132

119133
### Install
120134

@@ -153,12 +167,16 @@ All script are defined in the package.json file, but the most important ones are
153167

154168
- Run `npm start db.seed` to seed your seeds into the database.
155169

156-
## Debugger in VSCode
170+
![divider](./w3tec-divider.png)
171+
172+
## ❯ Debugger in VSCode
157173

158174
To debug your code run `npm start build` or hit `cmd + b` to build your app.
159175
Then, just set a breakpoint and hit `F5` in your Visual Studio Code.
160176

161-
## API Routes
177+
![divider](./w3tec-divider.png)
178+
179+
## ❯ API Routes
162180

163181
The route prefix is `/api` by default, but you can change this in the .env file.
164182
The swagger and the monitor route can be altered in the `.env` file.
@@ -172,7 +190,9 @@ The swagger and the monitor route can be altered in the `.env` file.
172190
| **/api/users** | Example entity endpoint |
173191
| **/api/pets** | Example entity endpoint |
174192

175-
## Project Structure
193+
![divider](./w3tec-divider.png)
194+
195+
## ❯ Project Structure
176196

177197
| Name | Description |
178198
| --------------------------------- | ----------- |
@@ -212,7 +232,9 @@ The swagger and the monitor route can be altered in the `.env` file.
212232
| ormconfig.json | TypeORM configuration for the database. Used by seeds and the migration. (generated file) |
213233
| mydb.sql | SQLite database for integration tests. Ignored by git and only available after integration tests |
214234

215-
## Logging
235+
![divider](./w3tec-divider.png)
236+
237+
## ❯ Logging
216238

217239
Our logger is [winston](https://github.com/winstonjs/winston). To log http request we use the express middleware [morgan](https://github.com/expressjs/morgan).
218240
We created a simple annotation to inject the logger in your service (see example below).
@@ -230,7 +252,9 @@ export class UserService {
230252
...
231253
```
232254
233-
## Event Dispatching
255+
![divider](./w3tec-divider.png)
256+
257+
## ❯ Event Dispatching
234258
235259
Our we use this awesome repository [event-dispatch](https://github.com/pleerock/event-dispatch) for event dispatching.
236260
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 +277,9 @@ export class UserService {
253277
}
254278
```
255279
256-
## Seeding
280+
![divider](./w3tec-divider.png)
281+
282+
## ❯ Seeding
257283
258284
Isn't it exhausting to create some sample data for your database, well this time is over!
259285
@@ -367,7 +393,9 @@ npm start db.seed
367393
| `npm start "db.seed --seeds <path>"` | Add a different path to your seeds (Default: `src/database/seeds/`) |
368394
| `npm start "db.seed --config <file>"` | Path to your ormconfig.json file |
369395
370-
## Run in Docker container
396+
![divider](./w3tec-divider.png)
397+
398+
## ❯ Run in Docker container
371399
372400
### Install Docker
373401
@@ -446,7 +474,9 @@ DB_HOST=localhost
446474
DB_PORT=3306
447475
```
448476
449-
## Further Documentations
477+
![divider](./w3tec-divider.png)
478+
479+
## ❯ Further Documentations
450480
451481
| Name & Link | Description |
452482
| --------------------------------- | --------------------------------- |
@@ -468,14 +498,18 @@ DB_PORT=3306
468498
| [GraphQL Documentation](http://graphql.org/graphql-js/) | A query language for your API. |
469499
| [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. |
470500
471-
## Related Projects
501+
![divider](./w3tec-divider.png)
502+
503+
## ❯ Related Projects
472504
473505
- [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.
474506
- [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
475507
- [aurelia-typescript-boilerplate](https://github.com/w3tecch/aurelia-typescript-boilerplate) - An Aurelia starter kit with TypeScript
476508
- [Auth0 Mock Server](https://github.com/hirsch88/auth0-mock-server) - Useful for e2e testing or faking an oAuth server
477509
478-
## License
510+
![divider](./w3tec-divider.png)
511+
512+
## ❯ License
479513
480514
[MIT](/LICENSE)
481515

w3tec-divider.png

728 Bytes
Loading

w3tec-logo.png

26 KB
Loading

0 commit comments

Comments
 (0)