{"_id":"@ashok.patel0609/restful-express-server","_rev":"3-c1e6ed36b2c7d42a9674821e0bed2d18","name":"@ashok.patel0609/restful-express-server","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@ashok.patel0609/restful-express-server","version":"1.0.0","description":"boilerplate for restful API express server","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ashok-patel/restful-express-server.git"},"publishConfig":{"registry":"https://registry.npmjs.org/","always-auth":true},"keywords":[],"author":{"name":"Ashok Patel"},"license":"ISC","bugs":{"url":"https://github.com/ashok-patel/restful-express-server/issues"},"homepage":"https://github.com/ashok-patel/restful-express-server#readme","dependencies":{"body-parser":"^1.19.0","compression":"^1.7.4","cors":"^2.8.5","dotenv":"^8.2.0","express":"^4.17.1","express-correlation-id":"^1.3.1","helmet":"^3.21.2"},"directories":{"test":"test"},"_id":"@ashok.patel0609/restful-express-server@1.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-KyXx/0UyeOWrpsBFbWm2/Y1HIhTUol69sKdbOT+0v/QyuKKXmp57HPoapJ8wXMJb86vypCmmIDAjplHAOhaMpQ==","shasum":"08570d3f7ca1c0c2fe30d2ff953ad4e64ffcee30","tarball":"https://registry.npmjs.org/@ashok.patel0609/restful-express-server/-/restful-express-server-1.0.0.tgz","fileCount":4,"unpackedSize":5747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRQarCRA9TVsSAnZWagAAaUYP/iKlP+bUSMr/62a/tFS4\nw/PhZ1sPwJWE1zQaGo5qxRFZsoym101XhaHX8/0I0A3hf4D72uBODfEdWEI9\nqxT0kO+C4G5qn2f05Y11qS+GqOOJDDyIfo3g/KzO3axBdxtu/xDxo8j0N+xW\nftG6cjLT1kKp88bOUsPl8+D48ahAAf+trSbAvHlziWlrc+zA/mgFaE2ANLkH\nscaTvhY4D2ByWL5qoflHb5NL5CO6E13e2b2SXg7v6V4agcjr6kqPXr3mV5K0\nJOVCTpqgbe8CZteBhEkyYNSo/WUUuGPR7clujGil774Pu313yeChazD84k8t\nuOvE9FPNjFIr7URHEopyjUPRaMx6A/SHM6vvgfbHjU5rpuKehlCzOfdBn8X+\nFSWTMM1tIjGTkW0iUHfhK0/SnnBbBNYeI6kvBWwDzqhzYaRFdwGC55CkeYte\nkRgQ253LUqprb76ueqDtZA09fN+V65wFhJEZFaA9hZpF5O/VJ6LeRL1z4KXQ\nhPpu1U0KB87YoV4WW+0SifjjmM6Kn5DFzt315/NigKVVWL9TtyOvKm85bRFD\nscHVD2yFqX9koiKTlXTobhvHyiHBf0rzUbJEmTyqrVKH9IRHGWP6XyEmY2Ek\nY5Z3J7qGFxrQNv/y6mV16uZzbWJDE0ShkHRqsv2B6Dd/vTjPzEMC3qkkM/kN\n626P\r\n=+BOY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDA4nqZnyR1LSpKPnMghSTNmbEM7KDbAHJGjIVsjUXw8gIhAJqcQ8qcUDc3bRu4zVWI+aR8DqaF8U14e8Yan9wMGVoA"}]},"maintainers":[{"name":"ashok.patel0609","email":"ashok.patel0609@gmail.com"}],"_npmUser":{"name":"ashok.patel0609","email":"ashok.patel0609@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/restful-express-server_1.0.0_1598359210566_0.08032589496842246"},"_hasShrinkwrap":false},"1.0.1":{"name":"@ashok.patel0609/restful-express-server","version":"1.0.1","description":"boilerplate for restful API express server","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ashok-patel/restful-express-server.git"},"publishConfig":{"registry":"https://registry.npmjs.org/","always-auth":true},"keywords":[],"author":{"name":"Ashok Patel"},"license":"ISC","bugs":{"url":"https://github.com/ashok-patel/restful-express-server/issues"},"homepage":"https://github.com/ashok-patel/restful-express-server#readme","dependencies":{"body-parser":"^1.19.0","compression":"^1.7.4","cors":"^2.8.5","dotenv":"^8.2.0","express":"^4.17.1","express-correlation-id":"^1.3.1","helmet":"^3.21.2"},"directories":{"test":"test"},"_id":"@ashok.patel0609/restful-express-server@1.0.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-LMV6r9ODThKX3ipHsmN9WLcEcF00i4Wp77/ghyByTPf8JoCMimUArTUcqgl6noh7QlF13eIiu9iivDoDvhEmvA==","shasum":"5e623d1d28a330b57287eac3f3e34e7953a3dff2","tarball":"https://registry.npmjs.org/@ashok.patel0609/restful-express-server/-/restful-express-server-1.0.1.tgz","fileCount":4,"unpackedSize":5758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRQcMCRA9TVsSAnZWagAAb7gP/Rdblqm528hvkwpjc7uh\nXE27EimYw9N8ZpPkSrP4PekBJ1iguS9MyQFw3ltcaHnCW9Syj/sRUePJ0yH8\nirFJvQjqEYV2p5N8SldGqEr0JNTqIvHCc5UF4t4fojMAl7dLDYmiqUEAk4Nu\nBvXooroPPaSx59kLvUy6XPFXzQT2B0KOrb+s+m7ZPNK70NsBy1l2yKdvQlMZ\nV8vgqLcP/KXayJWeJuDvQpsHOSi8Cfqo9wovo5VQLD9EYlqeUaFok5doRYr+\nYoX5YNTpsPY+IxBJPfLh/l6A7xHDgGT5Lv8JE4H+qNKrDLuNMZ9o5K5J+vKj\nm+ZnpuieQgiZulBczd8eNcsogDTtQeRmctCnlRknUed95kIogTgWF7EAZG0C\nCIpwljyHhd/YKSLhd8+r0UXBgbJCloYplmM5f48AxgkKAjgjNvJx1/wlfU7n\nVcFaer9djVPPP0ZT9yYZrwTSSCAvatmlr48kDVVXNIi1koYp8zztR7psQQ+D\n5EXwjOVPb7uneQrd7q8ZfJFSIKG2GyUmmKpS/65ZKNJQxzRN1cih3CYpyLwx\nxlKRV93OVsS3a+zF5oX+KlnRwGliF1G5UD0ttfE7upUS6pWZG9uiGu5Jk6m4\nREiJHkv/tmO7ZTmj9xNyuZffJeuXSKw+rvcqH/2jK267IKxkO4ugom4TXQkb\nwLlZ\r\n=v6AW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDo1wEwkRQqwGCQzdYM62eI+g6gqZyGxllH1S/G36PMAwIhAJ/B6KNmUT7pPgRYUb4i7JhU1oTa6+kKE48m2OsLK4q9"}]},"maintainers":[{"name":"ashok.patel0609","email":"ashok.patel0609@gmail.com"}],"_npmUser":{"name":"ashok.patel0609","email":"ashok.patel0609@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/restful-express-server_1.0.1_1598359308142_0.3954696871208354"},"_hasShrinkwrap":false},"1.0.2":{"name":"@ashok.patel0609/restful-express-server","version":"1.0.2","description":"boilerplate for restful API express server","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ashok-patel/restful-express-server.git"},"publishConfig":{"registry":"https://registry.npmjs.org/","always-auth":true},"keywords":[],"author":{"name":"Ashok Patel"},"license":"ISC","bugs":{"url":"https://github.com/ashok-patel/restful-express-server/issues"},"homepage":"https://github.com/ashok-patel/restful-express-server#readme","dependencies":{"body-parser":"^1.19.0","compression":"^1.7.4","cors":"^2.8.5","dotenv":"^8.2.0","express":"^4.17.1","express-correlation-id":"^1.3.1","helmet":"^3.21.2"},"directories":{"test":"test"},"_id":"@ashok.patel0609/restful-express-server@1.0.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RATlxqShgz1aOwK9mCUntFfA56ITUj7gbMMpBuJUaBVYNq+YUTdLc57eBnhiGhN6wVH4xV0m7em+NZfUWx1PGA==","shasum":"8c6b3a938ca261a2c03afb0d366ae993188d6a00","tarball":"https://registry.npmjs.org/@ashok.patel0609/restful-express-server/-/restful-express-server-1.0.2.tgz","fileCount":4,"unpackedSize":5759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRQmNCRA9TVsSAnZWagAATXUQAKTp/FqrfW1+AiYXeR10\nmOg/+nNM5bCFMZcE1jOvDnwbbFnVk/iXkOGUYncpI9FTekda7V+kykpK6GYm\nCDoYvOXBV+d0Y7MSceIF34swLcSZ6kjDCoW7E/39jh9TNGhBhoMXlhoeErcD\nYlLM+7mNEBLuulOM5xtoCx1649c/xQMbotOepKXcxjN+wfCupckOW09zx/sN\ncMcOOQIpw3PREC+pgF002ICqQ1ek4k3u0/APNlJOh9TGxKwJ+hRk2TW90A3g\neRD+YIRVDguEYQm9p/Uctmcc2C/UVhwW5dMtXok/r0smD8auT2dDvTEEbf14\nf3zBphVZrldc3qglRAT4MuatrMPnb4j9aYq8gGDLVmnHsg/jUNmm4ThGvUe8\nRvhywTMVT9N6LJ4sgoF5SMyYKzv4Zpn5uqTC1cn+ilmVSHXBpgr/eMS+YAzP\nFGna3hoWGwi7JlKuLbq2f2hqgKAh7yOKH0NVY+k4Ku2wMTqIDPs1NAiMrGCm\nJO8Ivb+9aHL9wJqfAQi2mk9ZYY9AWaVC9NvOaIZ5OcQ8wR/Dw9nsNWl5f9qk\nr7p4Gmn1nOW/rdA5BRGYsKnHXGVpBWnXx0FpVeNbBmRDUM+U8Oa0jUVC++Fr\nqBPfUl+8kIT8F/7jchnsxLeqQt5Dn3py1+vKW0h4YSpnU5P+biPDfMkfk5PK\n4exx\r\n=XDYc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9papLq76sVdd8gDfqX1Xq8CiZLE/FxOpo3ICsw993ZAIgZMZGNMM4yJXtLXlOfn1u8X0I+yuuU5JJowFl3T11oK8="}]},"maintainers":[{"name":"ashok.patel0609","email":"ashok.patel0609@gmail.com"}],"_npmUser":{"name":"ashok.patel0609","email":"ashok.patel0609@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/restful-express-server_1.0.2_1598359949187_0.6525247660694047"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-25T12:40:10.521Z","1.0.0":"2020-08-25T12:40:10.716Z","modified":"2022-04-04T15:45:56.464Z","1.0.1":"2020-08-25T12:41:48.249Z","1.0.2":"2020-08-25T12:52:29.306Z"},"maintainers":[{"name":"ashok.patel0609","email":"ashok.patel0609@gmail.com"}],"description":"boilerplate for restful API express server","homepage":"https://github.com/ashok-patel/restful-express-server#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/ashok-patel/restful-express-server.git"},"author":{"name":"Ashok Patel"},"bugs":{"url":"https://github.com/ashok-patel/restful-express-server/issues"},"license":"ISC","readme":"# rest-server\n---\n\n#### Usage\n+ Install package `npm install @ashok.patel0609/restful-express-server`\n+ Create an `.env` file with configs. (_list below_)\n+ Require `const {loadConfig, RestServer} = require('@ashok.patel0609/restful-express-server');`\n+ Creating instance\n\n```javascript\n// Load configurations or create custom object\nconst config = loadConfiguration();\n\n// Create a server instance\nconst server = new RestfulExpressServer(config);\n\n//  Load all middle-wares required for rest API development\nserver.pre();\n\n// router group\nlet router = server.router();\n\n// bind some routes\nrouter.get('/ashok', (req, res) => {\n    res.send({\n        now: (Date.now()),\n        ashok: true\n    })\n});\n// binding any router\n// or middleware\nserver.use(router);\n\n// bind 404, exception handling, terminating middle-ware and start listening.\nserver.post().terminating().listen();\n```\n\n---\n\n#### Supported config variables\n* `BODY_SIZE_LIMIT`, _Default: '100kb'_\n* `DEFAULT_ERROR_MESSAGE`, _Default: 'Some error occured'_\n* `logger`, _Default: console_\n* `injectException`, `Default: () => {}` \n* `PORT`, _Default: 5000_\n\n#### Silent features\n+ Correlation id logging on exception.\n+ Helmet initialized by default.\n+ Compression & JSON Body parsing.\n+ CORS enabled.\n+ Support for overriding logger.\n+ Support for injecting Custom Exception handler.","readmeFilename":"README.md"}