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
+26-23Lines changed: 26 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,31 @@
2
2
3
3
This is a super simple starter kit to develop APIs with HapiJS + TypeScript
4
4
5
-
## What currently supports?
5
+
## What currently supports?
6
6
7
-
This starter kit comes with the following features:
7
+
This starter kit comes with the following features:
8
8
9
-
-**Swagger-UI**
9
+
-**Swagger-UI**
10
10
-**Status Monitor**
11
11
-**.env files support**
12
12
-**nodemon for hot-reload**
13
-
-**Pretty Console Logger with Winston**
13
+
-**Pretty Console Logger with Winston**
14
14
-**Work with Yarn or NPM 6 as dependency resolvers**
15
15
-**Code formatting with Prettier as hook for Pre-commit**
16
16
-**Dockerfile + docker-compose for development**
17
17
-**Basic Test Suite with Tape**
18
18
-**Coverage Report**
19
19
-**Supports Heroku Deployment**
20
+
-**Supports Prettier for code formating**
21
+
-**Supports commitlint via husky to have standarized commit messages**
20
22
21
23
## Requirements
22
24
23
-
* NodeJS 10.x
24
-
* Yarn 1.x
25
+
- NodeJS > 10.x
26
+
- Yarn > 1.x
27
+
- NPM > 5.x
25
28
26
-
## How to use it?
29
+
## How to use it?
27
30
28
31
1. Download this project as a zip.
29
32
2. Run `yarn install`
@@ -32,15 +35,14 @@ This starter kit comes with the following features:
32
35
5. Visit [http://localhost:8080/api/users](http://localhost:8080/api/users) to test the REST API.
33
36
6. Visit [http://localhost:8080/status](http://localhost:8080/status) to view the status monitor.
34
37
35
-
OUTDATED: Now there's a CLI that currently support creating a new project from this repo: [create-typescript-api](https://github.com/BlackBoxVision/create-typescript-api)
36
-
38
+
UPDATED: Now there's a CLI that currently support creating a new project from this repo: [create-typescript-api](https://github.com/BlackBoxVision/create-typescript-api)
37
39
38
40
## TODO
39
41
40
42
This is not finished, there's still a lot of things to improve. Here you got some:
41
43
42
-
-[X] Simple test suite - added by the help of [@jcloutz](https://github.com/jcloutz)
43
-
-[X] Add support for test coverage - added by the help of [@jcloutz](https://github.com/jcloutz)
44
+
-[x] Simple test suite - added by the help of [@jcloutz](https://github.com/jcloutz)
45
+
-[x] Add support for test coverage - added by the help of [@jcloutz](https://github.com/jcloutz)
44
46
-[ ] Add GraphQL support
45
47
-[ ] Add support for Auth with JWT or Sessions
46
48
-[ ] Add support for TypeORM/Mongoose
@@ -50,18 +52,18 @@ This is not finished, there's still a lot of things to improve. Here you got som
50
52
51
53
### What are the package.json scripts for?
52
54
53
-
*`build-ts`: Compiles typescript based on config set in tsconfig.json.
54
-
*`start`: Starts node with the compiled typescript. Used by eg. Heroku.
55
-
*`docker:logs`: View Docker logs
56
-
*`docker:ps`: List Docker containers
57
-
*`docker:start`: Start Docker container based on docker-compose.yml file.
58
-
*`docker:stop`: Stop Docker container
59
-
*`nodemon:build`: Starts the Nodemon using ts-node. No need to compile beforehand.
60
-
*`nodemon:start`: Same as nodemon:build
61
-
*`format:lint`: Runs tslint on the typescipt files, based on tslint.js settings.
62
-
*`format:prettier`: Runs prettier on all ts-files.
63
-
*`postinstall`: Runs build-ts script. This is used by eg. Heroku automatically.
64
-
*`test`: Runs tests using nyc, and creates coverage report.
55
+
-`build-ts`: Compiles typescript based on config set in tsconfig.json.
56
+
-`start`: Starts node with the compiled typescript. Used by eg. Heroku.
57
+
-`docker:logs`: View Docker logs
58
+
-`docker:ps`: List Docker containers
59
+
-`docker:start`: Start Docker container based on docker-compose.yml file.
60
+
-`docker:stop`: Stop Docker container
61
+
-`nodemon:build`: Starts the Nodemon using ts-node. No need to compile beforehand.
62
+
-`nodemon:start`: Same as nodemon:build
63
+
-`format:lint`: Runs tslint on the typescipt files, based on tslint.js settings.
64
+
-`format:prettier`: Runs prettier on all ts-files.
65
+
-`postinstall`: Runs build-ts script. This is used by eg. Heroku automatically.
66
+
-`test`: Runs tests using nyc, and creates coverage report.
65
67
66
68
## Issues
67
69
@@ -72,4 +74,5 @@ If you found a bug, or you have an answer, or whatever. Please, raise an [issue]
72
74
Of course, if you see something that you want to upgrade from this library, or a bug that needs to be solved, PRs are welcome!
73
75
74
76
## License
77
+
75
78
Distributed under the **MIT license**. See [LICENSE](https://github.com/BlackBoxVision/typescript-hapi-starter/blob/master/LICENSE) for more information.
0 commit comments