@@ -22,6 +22,7 @@ This generator will help you to build your own Nest.JS Mongodb/MySQL API using T
2222
2323### Project Introduction
2424
25+ - Admin.js
2526- Support ES6/ES7 features
2627- Using Eslint followed [ Airbnb JavaScript Style Guide] ( https://github.com/airbnb/javascript )
2728- Husky
@@ -39,6 +40,39 @@ This generator will help you to build your own Nest.JS Mongodb/MySQL API using T
3940- jwt authentication
4041- passport google 2.0 strategy
4142
43+ ### AdminJS
44+
45+ AdminJS is available to use if you select Mongo + JWT/Passport, on the route:
46+
47+ ``` bash
48+ http://localhost:3000/admin
49+ ```
50+
51+ If you are not logged in, you will be redirected to the admin login page.
52+
53+ ``` bash
54+ http://localhost:3000/admin/login
55+ ```
56+
57+ To login in the admin panel, you have to have registered verified user with admin role.
58+
59+ To create a default admin user you can run migrations:
60+
61+ ``` bash
62+ mingrate-mongo up
63+ ```
64+
65+ The migrations will create a default admin user in db with creds:
66+
67+ ``` bash
68+ login: admin@test.com
69+ password: String_12345
70+ ```
71+
72+ ![ Alt Text2] ( https://media.giphy.com/media/HdWGgOGfQa0QRLNXME/giphy.gif )
73+
74+ _ Note: admin cat be generated only with mongo + jwt/passport_
75+
4276### Roles
4377For now, we are implement only few roles: ` user ` and ` admin `
4478
@@ -78,37 +112,6 @@ use Exclude decorator to exclude properties from serialization
78112
79113- Nodemailer
80114
81- ### AdminJS
82-
83- AdminJS is available to use if you select Mongo + JWT/Passport, on the route:
84-
85- ``` bash
86- http://localhost:3000/admin
87- ```
88-
89- If you are not logged in, you will be redirected to the admin login page.
90-
91- ``` bash
92- http://localhost:3000/admin/login
93- ```
94-
95- To login in the admin panel, you have to have registered verified user with admin role.
96-
97- To create a default admin user you can run migrations:
98-
99- ``` bash
100- mingrate-mongo up
101- ```
102-
103- The migrations will create a default admin user in db with creds:
104-
105- ``` bash
106- login: admin@test.com
107- password: String_12345
108- ```
109-
110- ![ Alt Text2] ( https://media.giphy.com/media/HdWGgOGfQa0QRLNXME/giphy.gif )
111-
112115## Requirements
113116
114117- node >= 14
0 commit comments