@enfyra/create-app 0.1.30 → 0.1.32
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 +12 -1
- package/components/env-builder.js +2 -1
- package/components/prompts.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ create-app my-app
|
|
|
45
45
|
✅ **Enfyra SDK** pre-configured
|
|
46
46
|
✅ **TypeScript** support
|
|
47
47
|
✅ **Tailwind CSS** styling
|
|
48
|
+
✅ **Database support** - MongoDB, PostgreSQL, MySQL
|
|
48
49
|
✅ **Environment** variables setup
|
|
49
50
|
✅ **Dependencies** installed automatically
|
|
50
51
|
|
|
@@ -62,14 +63,24 @@ npx @enfyra/create-app my-project
|
|
|
62
63
|
|
|
63
64
|
### Interactive setup
|
|
64
65
|
The CLI will guide you through:
|
|
65
|
-
- Package manager selection
|
|
66
|
+
- Package manager selection (npm, yarn, pnpm)
|
|
67
|
+
- Database type selection (MongoDB, PostgreSQL, MySQL)
|
|
66
68
|
- API endpoint configuration
|
|
67
69
|
- Development port setup
|
|
68
70
|
|
|
71
|
+
### Database Support
|
|
72
|
+
Choose from multiple database options during setup:
|
|
73
|
+
- 🍃 **MongoDB** - NoSQL document database
|
|
74
|
+
- 🐘 **PostgreSQL** - Powerful relational database
|
|
75
|
+
- 🐬 **MySQL** - Popular relational database
|
|
76
|
+
|
|
77
|
+
The selected database type will be automatically configured in your `.env` file.
|
|
78
|
+
|
|
69
79
|
### Environment Variables
|
|
70
80
|
After project creation, you can modify the `.env` file at any time to configure:
|
|
71
81
|
- API endpoints
|
|
72
82
|
- Port
|
|
83
|
+
- Database type
|
|
73
84
|
|
|
74
85
|
The `.env` file is automatically created and can be customized for your specific needs.
|
|
75
86
|
|
|
@@ -11,7 +11,8 @@ async function generateEnvFile(projectPath, config) {
|
|
|
11
11
|
function buildEnvContent(config) {
|
|
12
12
|
const lines = [
|
|
13
13
|
`API_URL=${config.apiUrl}`,
|
|
14
|
-
`PORT=${config.port}
|
|
14
|
+
`PORT=${config.port}`,
|
|
15
|
+
`DB_TYPE=${config.dbType}`
|
|
15
16
|
];
|
|
16
17
|
|
|
17
18
|
return lines.join('\n');
|
package/components/prompts.js
CHANGED
|
@@ -14,6 +14,17 @@ function getPrompts(availableManagers) {
|
|
|
14
14
|
})),
|
|
15
15
|
default: availableManagers.find(pm => pm.value === 'npm')?.value || availableManagers[0]?.value,
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
type: 'list',
|
|
19
|
+
name: 'dbType',
|
|
20
|
+
message: 'Database type:',
|
|
21
|
+
choices: [
|
|
22
|
+
{ name: '🍃 MongoDB', value: 'mongodb', short: 'MongoDB' },
|
|
23
|
+
{ name: '🐘 PostgreSQL', value: 'postgres', short: 'PostgreSQL' },
|
|
24
|
+
{ name: '🐬 MySQL', value: 'mysql', short: 'MySQL' }
|
|
25
|
+
],
|
|
26
|
+
default: 'mongodb'
|
|
27
|
+
},
|
|
17
28
|
{
|
|
18
29
|
type: 'input',
|
|
19
30
|
name: 'apiUrl',
|