Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajarakoto/node-boilerplate
Minimalistic boilerplate to quick-start Node.js development in TypeScript ๐
https://github.com/rajarakoto/node-boilerplate
boilerplate bun bunjs minimalist node nodejs template typescript
Last synced: about 2 months ago
JSON representation
Minimalistic boilerplate to quick-start Node.js development in TypeScript ๐
- Host: GitHub
- URL: https://github.com/rajarakoto/node-boilerplate
- Owner: RajaRakoto
- License: mit
- Created: 2024-01-11T15:14:01.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-09-22T10:39:03.000Z (3 months ago)
- Last Synced: 2024-11-07T10:03:09.408Z (about 2 months ago)
- Topics: boilerplate, bun, bunjs, minimalist, node, nodejs, template, typescript
- Language: JavaScript
- Homepage:
- Size: 687 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# node-boilerplate ๐
[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/for-you.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/open-source.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/uses-git.svg)](https://forthebadge.com) [![forthebadge](https://rajarakoto.github.io/github-docs/badge/build-by.svg)](https://forthebadge.com)
![Git](https://img.shields.io/badge/-Git-777?style=flat&logo=git&logoColor=F05032&labelColor=ffffff) ![Gitub](https://img.shields.io/badge/-Gitub-777?style=flat&logo=github&logoColor=777&labelColor=ffffff)
**Developer Ready: A comprehensive template. Works out of the box for most Node.js projects. This project is intended to be used with the latest active LTS release of Node.js.**
Instant Value - All basic tools included and configured:
- ๐ Typescript >= 5.3
- ๐ Node.js >= 20.10.0
- ๐ง Use Bun as package manager
- ๐ ES
- ๐งช Biome for code formatting and linting
- โ Jest or Bun test for fast unit testing and code coverage
- ๐ Type definitions for Node.js and Jest
- โ๏ธ EditorConfig for consistent coding style
- ๐ฆ NPM scripts for common operations
- โก Reproducible environments thanks to Volta
- ๐ ๏ธ Example configuration for GitHub Actions
- ๐ Simple example of TypeScript code and unit test
- ๐ Run tasks with Grunt (example for backup)
- ๐ Build faster with ESBuild
- ๐ฅ๏ธ Ungit for version control (git) with a GUI
- ๐ Dotenv for environment variables
- ๐ Nodemon for automatic restarts node server in development
- ๐ Tsc-watch for automatic transpile source files in development
- ๐ Runtime library for TypeScript helpers with tslib
- ๐๏ธ Utility functions for working with ts-api-utils---
### ๐ Usage
To use this template, use the following commands:
```bash
bun create github.com/RajaRakoto/node-boilerplate
cd
bun run pkg-upgrade # to upgrade outdated dependencies in interactive mode
```> NOTE 1: I employ the `MIT license` for this starter kit, which includes my name and GitHub profile. Please remember to adjust or remove it if deemed unnecessary.
> NOTE 2: In order to help you better understand the structure of this boilerplate, there is a `README.md` file in each subdirectory of src.
> NOTE 3: For certain configurations in the `package.json` file, you need to modify them to tailor them to your project (e.g: name, description, author, keywords, main, repository, ...).
---
### ๐ NPM Scripts
**Start**
- ๐ `start` - Run your application with Node.js.
- ๐ `start:bundle` - Run your application with Node.js using the bundled JavaScript file from dist.**Clean**
- ๐ `clean` - Remove coverage data, prod, build.
**Development**
- ๐ `dev:tsc:watch` - Interactive watch mode to automatically transpile source files with tsc-watch in development.
- ๐ `dev:nodemon:watch` - Interactive watch mode to automatically restart Node.js server in development with nodemon.**Build**
- ๐ `build` - Transpile TypeScript to ES6.
- ๐ `build:watch` - Interactive watch mode to automatically transpile source files .
- ๐ `build:bundle` - Bundle source files with ESbuild.**Testing**
- ๐ `test` - Run bun test.
- ๐ `test:watch` - Interactive watch mode to automatically re-run tests with bun.**Linting and Formatting**
- ๐ `biome:start` - Starts the Biome daemon server. You can specify a custom configuration file path using the `--config-path` option.
- ๐ `biome:stop` - Stops the Biome daemon server.
- ๐ `biome:fix` - Runs a source code check and applies automatic fixes (linter & formatter) according to the defined rules.
- ๐ `biome:unsafe` - Works like `biome:fix`, but may apply more invasive or risky changes.**Backup and Dependency Management**
- ๐ `backup` - Backup files with Grunt.
- ๐ `pkg-check` - Check useless dependencies with depcheck.
- ๐ `pkg-upgrade` - Upgrade outdated dependencies (interactive mode) with npm-check-updates.**Versioning**
- ๐ `versioning` - Start ungit server.
**NPM Commands**
- ๐ `npm-version:major` - Increments the major version number of your project using npm.
- ๐ `npm-version:minor` - Increments the minor version number of your project using npm.
- ๐ `npm-version:patch` - Increments the version patch number of your project using npm.**NVM**
- ๐ `nvm` - Manage multiple node.js versions. Easily switch between node versions per project to ensure compatibility.
> NOTE: `dev.tsc.watch` and `dev:nodemon:watch` script are designed to run at the same time when developing your application.
---
### ๐ Similar
You can also check out my other starter projects:
- ๐ [bun-boilerplate](https://github.com/RajaRakoto/bun-boilerplate)
- ๐ [react-boilerplate](https://github.com/RajaRakoto/react-boilerplate)
- ๐ [next-boilerplate](https://github.com/RajaRakoto/next-boilerplate)
- ๐ [qwik-boilerplate](https://github.com/RajaRakoto/qwik-boilerplate)
- ๐ [vscode-boilerplate](https://github.com/RajaRakoto/vscode-boilerplate)
- ๐ [cli-boilerplate](https://github.com/RajaRakoto/cli-boilerplate)