@uscreen.de/create-fastify-app 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2019-present [u|screen](https://uscreen.de)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # create-fastify-app
2
+
3
+ > cli to quickly bootstrap a new fastify-app
4
+
5
+ This package provides the cli skript to create a new `@uscreen.de/fastify-app` from scratch. No need to install any other prerequisits than node and yarn. Features include:
6
+
7
+ * initialize new __git__ repository
8
+ * initialize new __yarn__ package.json
9
+ * install all __dependencies__ and __devDependencies__
10
+ * add __skripts__ and __hooks__ to package.json
11
+ * setup __application skeleton__
12
+ * setup __dotfiles__ and __linting__
13
+ * setup __.env__ for starting
14
+
15
+ ## Usage
16
+
17
+ Use `yarn create` to create a new fastify-app, like so:
18
+
19
+ ```bash
20
+ $ yarn create @uscreen.de/fastify-app new-app
21
+ ```
22
+
23
+ and follow instructions. It will create a directory called `new-app` inside the current folder.
24
+ Inside that directory, it will generate the initial project structure and install any dependencies:
25
+
26
+ ```bash
27
+ new-app
28
+ ├── Makefile
29
+ ├── README.md
30
+ ├── app
31
+ │   ├── app.js
32
+ │   ├── config.js
33
+ │   ├── plugins
34
+ │   │   └── noop.js
35
+ │   ├── schemas.js
36
+ │   ├── server.js
37
+ │   └── services
38
+ │   └── noop.js
39
+ ├── package.json
40
+ ├── pm2-dev.config.js
41
+ ├── pm2.config.js
42
+ ├── test
43
+ │   ├── helper.js
44
+ │   └── noop.test.js
45
+ └── yarn.lock
46
+ ```
47
+
48
+ `yarn create` will update itself and checkout the latest version of the boilerplate packed with lot's of best-practice settings and prepared for local dev and pm2 deployment.
49
+
50
+ More Details can be found in `@uscreen.de/fastify-app` [README](https://www.npmjs.com/package/@uscreen.de/fastify-app)
51
+
52
+ After creation has finished cd into the new apps directory and check it's README for options. In General you should be able to start your new app in dev mode, like so:
53
+
54
+ ```bash
55
+ $ cd ./new-app
56
+ $ make start
57
+ $ make logs
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Roadmap
63
+
64
+ - add tests
65
+ - add more skeletons
66
+ - add options to choose from
67
+ - > ...TBD
68
+
69
+ ## Changelog
70
+
71
+ ### v0.2.0
72
+
73
+ - added instructions
74
+
75
+ ### v0.1.0
76
+
77
+ - initially bootstrapped
78
+ - added basic skeleton app based on fastify-app
79
+
80
+ ---
81
+
82
+ ## License
83
+
84
+ Licensed under [MIT](./LICENSE).
85
+
86
+ Published, Supported and Sponsored by [u|screen](https://uscreen.de)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uscreen.de/create-fastify-app",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "cli to create a new @uscreen.de/fastify-app",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -0,0 +1,42 @@
1
+ # ${app-name}
2
+
3
+ > __TODO:__
4
+ > add a name & short description of this apps purpose
5
+
6
+ ## Usage
7
+
8
+ * `make start`: start app on local dev
9
+ * `make logs`: watch logs
10
+ * `make stop`: stop app
11
+ * `make test`: test app
12
+ * `make deploy`: deploy app to stage
13
+ * `make live.deploy`: deploy app to live
14
+
15
+ ## Configure
16
+
17
+ Configuration is read by dotenv from `app/.env` file and validated _[optional modified]_ by `app/config.js`. Please add extra defaults if needed to `config.js`. Default values should __always__ refer to local dev setups.
18
+
19
+ > __Note:__
20
+ > the `.env` file should __never__ get pushed to repository. So adding secrets and credentials to `.env` can be considered a secure option bound to specific environments.
21
+
22
+ ## Api
23
+
24
+ After starting your server you will find swagger documenation at [http://127.0.0.1:3000/api/docs/](http://127.0.0.1:3000/api/docs/) to explore web api requests interactively.
25
+
26
+ ---
27
+
28
+ ## Roadmap
29
+
30
+ > TBD
31
+
32
+ ## Changelog
33
+
34
+ ### v0.0.0
35
+
36
+ - initially bootstrapped by `yarn create @uscreen.de/fastify-app`
37
+
38
+ ---
39
+
40
+ ## Credits
41
+
42
+ application [boilerplate](https://www.npmjs.com/package/@uscreen.de/fastify-app) provided by [u|screen](https://uscreen.de)
@@ -2,7 +2,6 @@
2
2
  "name": "new-fastify-app",
3
3
  "version": "0.0.0",
4
4
  "main": "app/server.js",
5
- "license": "MIT",
6
5
  "dependencies": {
7
6
  "@uscreen.de/fastify-app": "^0.2.9",
8
7
  "env-schema": "^1.0.0",
@@ -19,6 +18,7 @@
19
18
  "eslint-plugin-promise": "^4.2.1",
20
19
  "eslint-plugin-standard": "^4.0.1",
21
20
  "lint-staged": "^9.4.1",
21
+ "pino-pretty": "^3.2.1",
22
22
  "pm2": "^3.5.1",
23
23
  "prettier": "^1.18.2",
24
24
  "tap": "^14.6.9",