Skip to content

Commit 32d272c

Browse files
authored
docs: update README.md (#40)
1 parent 97b653e commit 32d272c

File tree

1 file changed

+52
-23
lines changed

1 file changed

+52
-23
lines changed

README.md

+52-23
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](http://prettier.io) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
44

5+
## Description
6+
7+
A sample NodeJs application, demonstrating how to use JWT Authentication, with access tokens and refresh tokens.
8+
59
## Installation
610

711
Development environment requirements:
@@ -10,25 +14,51 @@ Development environment requirements:
1014

1115
## Project initialization
1216

13-
### 1. [LOCAL] stage use DevContainer or docker-compose command
14-
```shell
15-
cp .env.dev .env
16-
docker compose -f ./.devcontainer/docker-compose.yml --env-file .env up -d --build
17+
### 1. Installation
18+
19+
```bash
20+
$ cp .env.dev .env
21+
$ docker compose up -d --build
22+
$ npm install
23+
```
24+
25+
### 2. Running the migration
26+
27+
```bash
28+
$ npm run migrate:run
1729
```
1830

19-
### 2. Migration
20-
```shell
21-
npm run migrate:create --name=<NAME>
22-
npm run migrate:run
31+
### 3. Running the app
32+
33+
```bash
34+
# development mode
35+
$ npm run start:dev
36+
37+
# production mode
38+
$ npm run start:prod
2339
```
2440

25-
## Next steps
41+
### 4. Running the test
42+
43+
```bash
44+
# unit tests
45+
$ npm run test
46+
47+
# integration tests
48+
$ npm run test:integration
49+
50+
# e2e tests
51+
$ npm run test:e2e
52+
```
53+
54+
## Roadmap
2655
- Auth
2756
- [X] Authenticate user
2857
- [X] Refresh token
2958
- [X] Logout a user
3059
- [X] Forgot password
3160
- [X] Reset password
61+
- [ ] Add Redis cache
3262
- User
3363
- [X] Create a new user
3464
- [X] Update user
@@ -38,7 +68,6 @@ Development environment requirements:
3868
- [X] Facebook
3969
- [X] Apple
4070
- [X] Google
41-
- [ ] Twitter
4271
- [ ] Linkedin
4372
- [X] Github
4473
- Test
@@ -51,33 +80,33 @@ Development environment requirements:
5180

5281
### 1. Enable Git hooks
5382

54-
```
55-
npx husky install
56-
npx husky add .husky/commit-msg 'npm run commit-msg'
57-
npx husky add .husky/pre-commit 'npm run pre-commit'
83+
```bash
84+
$ npx husky install
85+
$ npx husky add .husky/commit-msg 'npm run commit-msg'
86+
$ npx husky add .husky/pre-commit 'npm run pre-commit'
5887
```
5988

6089
### 2. Why is my git pre-commit hook not executable by default?
6190

6291
- Because files are not executable by default; they must be set to be executable.
6392

64-
```
65-
chmod ug+x .husky/*
66-
chmod ug+x .git/hooks/*
93+
```bash
94+
$ chmod ug+x .husky/*
95+
$ chmod ug+x .git/hooks/*
6796
```
6897

6998
### 3. Git commit
7099

71-
```shell
72-
npm run commit
100+
```bash
101+
$ npm run commit
73102
```
74103

75104
### 4. Project release
76105

77-
```shell
78-
npm run release:patch // Patch release 0.1.0 -> 0.1.1
79-
npm run release:minor // Minor release 0.1.1 -> 0.2.0
80-
npm run release:major // Major release 0.2.0 -> 1.0.0
106+
```bash
107+
$ npm run release:patch // Patch release 0.1.0 -> 0.1.1
108+
$ npm run release:minor // Minor release 0.1.1 -> 0.2.0
109+
$ npm run release:major // Major release 0.2.0 -> 1.0.0
81110
```
82111

83112
### 5. Project Structure

0 commit comments

Comments
 (0)