You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-39Lines changed: 7 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,34 +7,14 @@
7
7
8
8
# Getting started
9
9
10
-
## Installation
10
+
```bash
11
+
yarn install
12
+
cp .env.template .env
13
+
docker compose up
14
+
```
11
15
12
-
...
13
-
14
-
----------
15
-
16
-
## Database
17
-
18
-
The example codebase uses [Typeorm](http://typeorm.io/) with Postgres.
19
-
20
-
Create a new postgres database with the name `nestjsrealworld` (or the name you specified in the ormconfig.json)
21
-
22
-
Set mysql database settings in ormconfig.json
23
-
24
-
{
25
-
"type": "mysql",
26
-
"host": "localhost",
27
-
"port": 3306,
28
-
"username": "your-mysql-username",
29
-
"password": "your-mysql-password",
30
-
"database": "nestjsrealworld",
31
-
"entities": ["src/**/**.entity{.ts,.js}"],
32
-
"synchronize": true
33
-
}
34
-
35
-
Start local mysql server and create new database 'nestjs_realworld'
36
-
37
-
On application start, tables for all entities will be created.
16
+
- Open `http://localhost:3000/api/articles` in your favourite browser`
17
+
- Open `http://localhost:3000/docs` to view swagger API document
38
18
39
19
----------
40
20
@@ -46,21 +26,9 @@ This application adheres to the api specifications set by the [Thinkster](https:
46
26
47
27
More information regarding the project can be found here https://github.com/gothinkster/realworld
48
28
49
-
----------
50
-
51
-
## Start application
52
-
53
-
-`npm start`
54
-
- Test api with `http://localhost:3000/api/articles` in your favourite browser
55
29
56
30
----------
57
31
58
32
# Authentication
59
33
60
34
This applications uses JSON Web Token (JWT) to handle authentication. The token is passed with each request using the `Authorization` header with `Token` scheme. The JWT authentication middleware handles the validation and authentication of the token. Please check the following sources to learn more about JWT.
61
-
62
-
----------
63
-
64
-
# Swagger API docs
65
-
66
-
This example repo uses the NestJS swagger module for API documentation. [NestJS Swagger](https://github.com/nestjs/swagger) - [www.swagger.io](https://swagger.io/)
0 commit comments