This CLI tool streamlines the creation of new server projects using Fastify with SWC and Jest.
npm i -g fastify-swc-typescript-server-bootstrap-cli
After installation, bootstrap a new Fastify SWC server project using the command:
fastify-swc-server [project-name]
Replace [project-name]
with the name you wish to give to your new project. This command will create a new directory with the specified name, clone the Fastify SWC server setup, and configure the project accordingly.
To create a new project named my-server-app
, run:
fastify-swc-server my-server-app
- Clones a Fastify SWC server template from this repository.
- Removes the original
.git
directory from the cloned repository and initializes a new git repository, allowing for a clean version control start. - Updates the
package.json
with the specified project name and clears the author field. - Implements a testing suite using Mocha and Chai, integrating Husky as a pre-commit hook, ensuring that all tests must pass successfully before changes can be committed.
- More customizations to be added...