feat: добавление скрипта postinstall и обновление package-lock.json
- Добавлен скрипт postinstall для автоматического создания файлов .env и .env.example. - Обновлен package-lock.json для отражения изменений в зависимостях.
This commit is contained in:
9
.env.example
Normal file
9
.env.example
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Application settings
|
||||||
|
TZ=Europe/Moscow
|
||||||
|
APP_PORT=8044
|
||||||
|
|
||||||
|
MONGO_INITDB_ROOT_USERNAME=qqq
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD=qqq
|
||||||
|
|
||||||
|
# MongoDB connection string
|
||||||
|
MONGO_ADDR=mongodb://qqq:qqq@127.0.0.1:27018
|
||||||
1
package-lock.json
generated
1
package-lock.json
generated
@@ -7,6 +7,7 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "multi-stub",
|
"name": "multi-stub",
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ai": "^4.1.13",
|
"ai": "^4.1.13",
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
"up:prod": "node dist/server/index.js",
|
"up:prod": "node dist/server/index.js",
|
||||||
"eslint": "npx eslint ./server",
|
"eslint": "npx eslint ./server",
|
||||||
"eslint:fix": "npx eslint ./server --fix",
|
"eslint:fix": "npx eslint ./server --fix",
|
||||||
"test": "jest"
|
"test": "jest",
|
||||||
|
"postinstall": "node -e \"const fs = require('fs'); const envExample = `# Настройки сервера\\nPORT=3000\\nNODE_ENV=development\\n\\n# Настройки базы данных\\nMONGODB_URI=mongodb://localhost:27017/multi-stub\\n\\n# Настройки JWT\\nJWT_SECRET=your_jwt_secret\\nJWT_EXPIRES_IN=7d\\n\\n# Прочие настройки\\nLOG_LEVEL=info`; if (!fs.existsSync('.env.example')) { fs.writeFileSync('.env.example', envExample); console.log('Created .env.example file'); } if (!fs.existsSync('.env')) { fs.copyFileSync('.env.example', '.env'); console.log('Created .env file from .env.example'); }\""
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user