Just start your Node.js project in a seconds.
- ESLint: Linting for maintaining code quality.
- Prettier: Code formatting for a consistent style.
- TypeScript: Typed JavaScript for better development experience.
- Debugging: Pre-configured debugging setup for VsCode.
-
Clone the repository:
git clone https://github.com/dvangonen/best-node-boilerplate.git cd best-node-boilerplate
-
Install dependencies:
pnpm install
-
Run the development server:
npm run dev
npm run dev
: Start the development server.npm run build
: Build the project for production.npm run lint
: Run ESLint.npm run format
: Run Prettier.
To deploy the project, you can use the provided deploy.sh
script.
It is a very simple and easy-to-use approach. But maybe I will add a Dockerfile approach soon.
- Run the
deploy.sh
script.
This script will build the project using esbuild
. So the output will be as tiny as possible.
Then it copy the contents of the dist
folder, and push it to the deploy
branch of your repository.
chmod +x deploy.sh
./deploy.sh
- Then you can
fetch
the content ofdeploy
branch on your own server.
This will download a pre-built and minified version of your code.
git clone [your-repo-url] -b deploy --single-branch
- Just start it with
node
on your server
npm start
This project is licensed under the MIT License.