cli to quickly bootstrap a new fastify-app
This package provides the cli skript to create a new @uscreen.de/fastify-app
from scratch. No need to install any other prerequisites than node and yarn. Features include:
- initialize new git repository
- initialize new yarn package.json
- install all dependencies and devDependencies
- add skripts and hooks to package.json
- setup application skeleton
- setup dotfiles and linting
- setup .env for starting
Use yarn create
to create a new fastify-app, like so:
$ yarn create @uscreen.de/fastify-app new-app
and follow instructions. It will create a directory called new-app
inside the current folder.
Inside that directory, it will generate the initial project structure and install any dependencies:
new-app
├── Makefile
├── README.md
├── app
│ ├── app.js
│ ├── config.js
│ ├── plugins
│ │ └── noop.js
│ ├── schemas.js
│ ├── server.js
│ └── services
│ └── noop.js
├── package.json
├── pm2-dev.config.cjs
├── pm2.config.cjs
├── test
│ ├── helper.js
│ └── noop.test.js
└── yarn.lock
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.
More Details can be found in @uscreen.de/fastify-app
README
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:
$ cd ./new-app
$ make start
$ make logs
- add tests
- add more skeletons
- add options to choose from
-
...TBD
- upgraded to node 20.x (LTS)
- upgraded to node 18.x (LTS)
- migrated yorkie to husky
- cleanup app.js and server.js
- uses @uscreen.de/common-esm for esm migration
- uses @uscreen.de/fastify-app options for app creation
- uses nodemon for dev mode
- dropped pm2 package and config
- switch skeleton to ESM only
- upgrade skeleton to fastify@4.x
- added: graceful shutdown in skeleton
- changed: use versions specified in skeleton's package.json
- moved to esm
- upgraded to node 16.x (LTS)
- upgraded to node 14.x (LTS)
- upgraded to fastify 3.x
- upgraded to node 12.x (LTS)
- added instructions
- initially bootstrapped
- added basic skeleton app based on fastify-app
Licensed under MIT.
Published, Supported and Sponsored by u|screen