Added an interactive Node.js script (setup.js) to guide users through the initial environment setup. This script prompts for necessary database credentials and generates JWT secrets, then creates/updates the .env file. A 'setup' script has been added to api.hyungi.net/package.json for easy execution. This improves the first-time setup experience by streamlining the .env file creation process.
51 lines
1.5 KiB
JSON
51 lines
1.5 KiB
JSON
{
|
|
"name": "hyungi-api",
|
|
"version": "2.2.0",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"start": "pm2-runtime start ecosystem.config.js --env production",
|
|
"dev": "pm2-runtime start ecosystem.config.js --env development",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"test:unit": "jest tests/unit",
|
|
"test:integration": "jest tests/integration",
|
|
"test:verbose": "jest --verbose",
|
|
"setup": "node ../setup.js",
|
|
"db:migrate": "knex migrate:latest --knexfile knexfile.js",
|
|
"db:migrate:make": "knex migrate:make --knexfile knexfile.js",
|
|
"db:rollback": "knex migrate:rollback --knexfile knexfile.js",
|
|
"db:seed": "knex seed:run --knexfile knexfile.js",
|
|
"db:seed:make": "knex seed:make --knexfile knexfile.js"
|
|
},
|
|
"dependencies": {
|
|
"@simplewebauthn/server": "^13.1.1",
|
|
"async-retry": "^1.3.3",
|
|
"bcrypt": "^6.0.0",
|
|
"bcryptjs": "^2.4.3",
|
|
"compression": "^1.8.1",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.4.5",
|
|
"express": "^4.18.2",
|
|
"express-rate-limit": "^7.5.1",
|
|
"express-validator": "^7.2.1",
|
|
"helmet": "^7.2.0",
|
|
"jsonwebtoken": "^9.0.0",
|
|
"knex": "^3.1.0",
|
|
"multer": "^1.4.5-lts.1",
|
|
"mysql2": "^3.14.1",
|
|
"node-cache": "^5.1.2",
|
|
"pm2": "^5.3.0",
|
|
"qrcode": "^1.5.4",
|
|
"redis": "^5.9.0",
|
|
"sqlite3": "^5.1.6",
|
|
"swagger-jsdoc": "^6.2.8",
|
|
"swagger-ui-express": "^5.0.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/jest": "^29.5.12",
|
|
"jest": "^29.7.0",
|
|
"supertest": "^7.0.0"
|
|
}
|
|
}
|