create-prod-backend 1.2.5 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/package.json +1 -1
- package/src/prompts/questions.js +3 -2
- package/src/services/dependency.service.js +2 -1
package/README.md
CHANGED
|
@@ -80,16 +80,23 @@ npx create-prod-backend
|
|
|
80
80
|
|
|
81
81
|
## Supported Dependencies
|
|
82
82
|
|
|
83
|
+
# Must have
|
|
83
84
|
* express
|
|
84
|
-
* nodemon
|
|
85
85
|
* cors
|
|
86
|
-
* bcryptjs
|
|
87
86
|
* dotenv
|
|
88
|
-
* jsonwebtoken
|
|
89
87
|
* cookie-parser
|
|
88
|
+
|
|
89
|
+
# Dev Dependency
|
|
90
|
+
* nodemon
|
|
91
|
+
|
|
92
|
+
# Optinal
|
|
93
|
+
* bcryptjs
|
|
94
|
+
* zod
|
|
95
|
+
* argon2
|
|
96
|
+
* jsonwebtoken
|
|
90
97
|
* cloudinary
|
|
91
98
|
* multer
|
|
92
|
-
* mongoose
|
|
99
|
+
* mongoose
|
|
93
100
|
|
|
94
101
|
---
|
|
95
102
|
|
package/package.json
CHANGED
package/src/prompts/questions.js
CHANGED
|
@@ -24,9 +24,10 @@ export default [
|
|
|
24
24
|
message: chalk.bold.yellow("Do you want .env?"),
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
type: "
|
|
27
|
+
type: "select",
|
|
28
28
|
name: "auth",
|
|
29
|
-
message: chalk.bold.yellow("Add Authentication
|
|
29
|
+
message: chalk.bold.yellow("Add Authentication : "),
|
|
30
|
+
choices: ["No Authentication", "JWT + bcryptjs", "JWT + argon2"],
|
|
30
31
|
},
|
|
31
32
|
|
|
32
33
|
{
|
|
@@ -4,7 +4,8 @@ import { execSync } from "child_process";
|
|
|
4
4
|
export function installDeps(projectPath, answer) {
|
|
5
5
|
let deps = ["express","cors","dotenv","cookie-parser"];
|
|
6
6
|
|
|
7
|
-
if(answer.auth) deps.push("jsonwebtoken", "
|
|
7
|
+
if(answer.auth === "JWT + bcryptjs") deps.push("jsonwebtoken", "bcryptjs");
|
|
8
|
+
if(answer.auth === "JWT + argon2") deps.push("jsonwebtoken", "argon2");
|
|
8
9
|
if(answer.validation) deps.push("zod");
|
|
9
10
|
if(answer.fileUpload) deps.push("multer", "cloudinary");
|
|
10
11
|
if(answer.devTools) deps.push("nodemon");
|