Skip to content

Commit

Permalink
feat: [readme & workflows]
Browse files Browse the repository at this point in the history
  • Loading branch information
nc-minh committed Feb 5, 2024
1 parent 62401fb commit 40c2bf9
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test Build CI

on:
push:
branches: ['master']
pull_request:
branches: ['master']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build --if-present
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
[![tests](https://github.com/nc-minh/nodejs-express-boilerplate/actions/workflows/test.yml/badge.svg)](https://github.com/nc-minh/nodejs-express-boilerplate/actions/workflows/test.yml)

# NodeJs Express boilerplate

Here's a boilerplate project for rapidly constructing a web server using Node.js, Express, Mongoose, and TypeScript. It includes file upload functionality using multer. Additionally, it integrates several syntax validation tools such as commitlint, eslint, lint-staged, prettier, and husky.

# Quick start

Prepare:

```json
"engines": {
"node": "20.x",
"npm": "10.x"
}
```

Clone the repo:

```
git clone git@github.com:nc-minh/nodejs-express-boilerplate.git
```

Install the dependencies:

```
npm i
```

Set the environment variables:

```
cp .env.example .env
```

Start on dev:

```
npm run dev
```

Start on prod:

```
npm run build && npm run start
```

0 comments on commit 40c2bf9

Please sign in to comment.