Skip to content

Commit 90c5317

Browse files
committed
fix: update readme
1 parent 7997ec4 commit 90c5317

File tree

1 file changed

+93
-7
lines changed

1 file changed

+93
-7
lines changed

README.md

Lines changed: 93 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- npm >= `v6.x`
2222
- node >= `v10.x`
2323
- eslint `v7.x`
24+
- husky >= `v5.x`
2425
- Familiar with TypeScript 💪
2526

2627
## Feature
@@ -35,52 +36,126 @@
3536
- Using [Babel Resolver](https://github.com/tleunen/babel-plugin-module-resolver) for simplify the require/import paths
3637
- Documentation with [Swagger](https://github.com/swagger-api/swagger-ui)
3738
- Generate Log File with [Winston](https://github.com/winstonjs/winston)
39+
- [Convensional Commit](https://www.conventionalcommits.org/en/v1.0.0/) with [Husky](https://github.com/typicode/husky) `v5` & [Commitlint](https://github.com/conventional-changelog/commitlint)
40+
41+
## How to use
42+
43+
clone this repo with `https` / `ssh` / `github cli`
44+
45+
```sh
46+
git clone https://github.com/masb0ymas/boilerplate-express-typescript-sequelize.git
47+
```
48+
49+
After cloning this repo, make sure you have `duplicated` the `.env.example` file to `.env`, don't let the .env.example file be deleted or renamed.
3850

3951
## Install
4052

4153
```sh
54+
npm install
55+
56+
or
57+
4258
yarn
4359
```
4460

61+
## Enabled Husky
62+
63+
```sh
64+
npx husky install
65+
66+
or
67+
68+
yarn husky install
69+
```
70+
4571
## Usage Development
4672

4773
```sh
48-
yarn run start
74+
npm run dev
75+
76+
or
77+
78+
yarn dev
4979
```
5080

5181
## Type Checking
5282

5383
```sh
54-
yarn run type-check || yarn run type-check:watch
84+
npm run type-check
85+
86+
or
87+
88+
yarn type-check
89+
```
90+
91+
## Type Checking Watching
92+
93+
```sh
94+
npm run type-check:watch
95+
96+
or
97+
98+
yarn type-check:watch
5599
```
56100

57101
## Build
58102

103+
Recommended using build with babel, build with ts is still unstable
104+
59105
```sh
60-
yarn run build
106+
npm run build:babel
107+
108+
or
109+
110+
yarn build:babel
61111
```
62112

63113
## Using Sequelize
64114

65-
After cloning this repo, make sure you have duplicated the .env.example file to .env, don't let the .env.example file be deleted or renamed.
115+
Using sequelize with development mode, you can set the database configuration in `.env`, like this :
116+
117+
```sh
118+
DB_CONNECTION=mysql
119+
DB_HOST=127.0.0.1
120+
DB_PORT=3306
121+
DB_DATABASE=example_database
122+
DB_USERNAME=example_user
123+
DB_PASSWORD=example_password
124+
DB_OPERATOR_ALIAS=
125+
DB_TIMEZONE=+07:00
126+
```
127+
128+
if you set production mode change the database config `PROD_DB_DATABASE`
66129

67130
then after that you can adjust the database config in `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`.
68131
now you can run this command :
69132

70133
```sh
134+
npm run db:reset
135+
136+
or
137+
71138
yarn db:reset
72139
```
73140

74141
## Usage Production
75142

76143
```sh
77-
yarn run serve:production
144+
npm run serve:production
145+
146+
or
147+
148+
yarn serve:production
78149
```
79150

80151
## Run tests
81152

82153
```sh
83-
yarn run test
154+
npm run test
155+
156+
or
157+
158+
yarn test
84159
```
85160

86161
## Run with Docker
@@ -173,6 +248,18 @@ Detached mode: Run containers in the background,
173248
docker-compose up -d
174249
```
175250

251+
## Release your version app
252+
253+
if you want to release the app version, you can use the following command :
254+
255+
```sh
256+
npm run release
257+
258+
or
259+
260+
yarn release
261+
```
262+
176263
## SMTP Basic
177264

178265
I use [topol.io](https://topol.io/) to create email templates, and it's free and can export to html format
@@ -228,7 +315,6 @@ OAUTH_REFRESH_TOKEN=your_refresh_token
228315

229316
[<img height="40" src="https://trakteer.id/images/mix/navbar-logo-lite.png">](https://trakteer.id/masb0ymas)
230317

231-
232318
## Show your support
233319

234320
Give a ⭐️ if this project helped you!

0 commit comments

Comments
 (0)