-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
96 lines (96 loc) · 4.24 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"name": "@npm-packages-collection/generic-nodejs-express-api",
"description": "Generic NodeJs Express API",
"author": "Eugene Yevhen Andruszczenko <[email protected]>",
"contributors": [
"32teeth <[email protected]> (https://github.com/32teeth)"
],
"repository": {
"type": "git",
"url": "git+https://github.com/npm-packages-collection/generic-nodejs-express-api.git"
},
"license": "CC-BY-SA-4.0",
"version": "0.1.6",
"keywords": [
"nodejs",
"express",
"api",
"subdomain",
"starter",
"web"
],
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"engines": {
"node": "20.x",
"npm": "10.x"
},
"main": "index.js",
"bin": {
"generic-nodejs-express-api": "bin/cli.mjs"
},
"scripts": {
"reset": "npm run hook && npm install",
"certs": "npm run certs:sudo",
"certs:sudo": "[ \"$EUID\" -ne 0 ] && echo '\\033[0;43mYou will need to run the command in sudo.\\033[0m\\nNPM command -> \\033[0;32msudo npm run certs\\033[0m' && npm run certs:sudo:clipboard && exit 1 || npm run certs:generate",
"certs:sudo:clipboard": "sh -c 'CMD=\"sudo npm run certs\" && (echo \"$CMD\" | pbcopy || echo \"$CMD\" | xclip -selection clipboard || echo \"$CMD\" | clip) && echo \"\\033[0;32m${CMD}\\033[0m \\033[0;37m <-- has been copied to your clipboard\\033[0m\"'",
"certs:generate": "run-s certs:env certs:clean certs:mkdir certs:ssl certs:chmod certs:port certs:vars certs:clean certs:success",
"certs:clean": "rm -rf certs",
"certs:mkdir": "mkdir certs",
"certs:ssl": "sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certs/selfsigned.key -out certs/selfsigned.crt",
"certs:chmod": "chmod 777 certs/*",
"certs:env": "rm .env && touch .env",
"certs:vars": "echo \"APP_CRT=$(base64 -i certs/selfsigned.crt)\" >> .env && echo \"APP_KEY=$(base64 -i certs/selfsigned.key)\" >> .env",
"certs:port": "echo \"PORT=3000\" >> .env",
"certs:key": "echo \"APP_KEY=$(base64 -i certs/selfsigned.key)\" >> .env",
"certs:crt": "echo \"APP_CRT=$(base64 -i certs/selfsigned.crt)\" >> .env",
"certs:success": "echo '\\033[0;42mCertificates have been generated\\033[0m\\033[32m\\nYou can now run the following command to start the server:\\033[0m\\nNPM command -> \\033[0;32mnpm run dev:https\\033[0m' && npm run certs:success:clipboard",
"certs:success:clipboard": "sh -c 'CMD=\"npm run dev:https\" && (echo \"$CMD\" | pbcopy || echo \"$CMD\" | xclip -selection clipboard || echo \"$CMD\" | clip) && echo \"\\033[0;32m${CMD}\\033[0m \\033[0;37m <-- has been copied to your clipboard\\033[0m\"'",
"hook": "run-s certs:clean certs:env certs:port",
"sass:build": "sass assets/scss:public/css",
"sass:watch": "sass --watch assets/scss:public/css",
"sass": "run-p sass:watch",
"dev": "run-p sass:watch dev:server",
"dev:server": "nodemon index.js",
"dev:https": "HTTPS=true npm run dev",
"prod": "NODE_ENV=production npm run dev",
"prod:https": "NODE_ENV=production HTTPS=true npm run dev",
"start": "HEROKU=true node index.js",
"heroku-prebuild": "echo This runs before Heroku installs dependencies.",
"heroku-postbuild": "echo This runs after Heroku installs dependencies, but before Heroku prunes and caches dependencies.",
"heroku-cleanup": "echo This runs after Heroku prunes and caches dependencies.",
"test": "mocha",
"publish:npm": "npm publish --registry https://registry.npmjs.org/",
"publish:github": "npm publish --registry https://npm.pkg.github.com/",
"publish": "npm run publish:npm && npm run publish:github"
},
"pre-commit": {
"run": "hook"
},
"dependencies": {
"base-64": "^1.0.0",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"ejs": "^3.1.10",
"express": "^4.18.2",
"ws": "^8.16.0"
},
"devDependencies": {
"chai": "^4.2.0",
"chai-http": "^4.3.0",
"chalk": "^4.1.2",
"mocha": "^10.7.3",
"nodemon": "^3.0.2",
"npm-run-all": "^4.1.5",
"pre-commit": "^1.2.2",
"sass": "^1.77.8"
},
"bugs": {
"url": "https://github.com/npm-packages-collection/generic-nodejs-express-api/issues"
},
"homepage": "https://github.com/npm-packages-collection/generic-nodejs-express-api#readme",
"directories": {
"test": "test"
}
}