{"_id":"@conjurelabs/express-abridged","_rev":"2-f0a0e213583321aff5283067813d89a0","name":"@conjurelabs/express-abridged","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0-rc1":{"name":"@conjurelabs/express-abridged","version":"1.0.0-rc1","description":"express server scaffolding","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ConjureLabs/express-abridged.git"},"bugs":{"url":"https://github.com/ConjureLabs/express-abridged/issues"},"homepage":"https://github.com/ConjureLabs/express-abridged#readme","dependencies":{"body-parser":"^1.18.3","compression":"^1.7.3","cookie-parser":"^1.4.3","express":"^4.16.3","helmet":"^3.16.0","morgan":"^1.9.1"},"peerDependencies":{"@conjurelabs/route":"1.x.x","@conjurelabs/utils":"0.x.x"},"gitHead":"46090ba470fcce10d6a1c373b56935b9d4010e67","_id":"@conjurelabs/express-abridged@1.0.0-rc1","_npmVersion":"5.8.0","_nodeVersion":"8.7.0","_npmUser":{"name":"tmarshall","email":"timothyjmarshall@gmail.com"},"dist":{"integrity":"sha512-VonXFNQf304qq5AUZ20/CH4XYVuj/lqxaGd+gbORdsC5+9LrhW1UGgvcn+DnTT6ojfxcwlhKLvrEpcgsCfO0IA==","shasum":"98c9d75db28bb4b57711df708ffcac64a5a87776","tarball":"https://registry.npmjs.org/@conjurelabs/express-abridged/-/express-abridged-1.0.0-rc1.tgz","fileCount":5,"unpackedSize":6273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchaJJCRA9TVsSAnZWagAAoNQP/RUSWIDi/ugoR1Dh09/V\n3DCbdmhvjwiSRuxNOtDXlhcBkmU3C/1XhkdZVuW4wszBqhsKDCzWCZ7HnRn1\nHMyhMdqDzTiKjmg1qhE/to7C3RoKqPLCsYoaPVFkUDPsQkxd+StwlMwGiHb+\ngANkokVkWGi7w0cqiJpyCGMydUlfHmap4BxO8mp4wOGa3Ipzd4G9IVnnqi8S\nqmycPiY7kWa3IbQ8t1TVQQF60465xFCvioJIFcfJirBOBZPDBWVfKDsnG9MB\nBKJz0FQUKG51039lBGqXHEzobOCM9X02KjHi4unr4qhy8ApFfI8fiEJ2R/+m\na3mlOrz4m5DHHEQ1mN7XWE+x4GJT/kajIysjoH+9OskxkNEgwLpiCfy/yaMj\n+dGXtfaX0RsBKseuejDxnk2oKbq2nxtdLyVvjGu30PZC9KqVKyymYp3Eg72L\nz8DuqHt3q0ymIrIJrbQv+8AK5TsJhZA3xnwZ2zpkzJAfgZmAP+El7WFwT6/s\nlcrBn2tIW7qCFITQuBmDFSPVQL9jR7TXZY4QUC6rQHX1ja7j0Y748e0Bb6PZ\nzW3zJJsZo/H3z6BIM000g7ihwLhAcB7sXOq4uoKNifD4pIu/f1rTJtb2kxbE\nT2/cm80UMmkcwOGCfcvUvX9gphB6XKPk0bzHtA6WnQoA+Gb2Zh43XeRS5xRM\n6YjC\r\n=Mr8x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAVZGAcYb7V2xzAPqxor6Ld12v5UssXw3VmCALWC3+97AiA7xhfQtR2py8GOlf4NjXPtqvaAc6mfdpqkEt5EyhMh2g=="}]},"maintainers":[{"name":"tmarshall","email":"timothyjmarshall@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-abridged_1.0.0-rc1_1552261704782_0.6129536189809643"},"_hasShrinkwrap":false},"1.0.0":{"name":"@conjurelabs/express-abridged","version":"1.0.0","description":"express server scaffolding","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ConjureLabs/express-abridged.git"},"bugs":{"url":"https://github.com/ConjureLabs/express-abridged/issues"},"homepage":"https://github.com/ConjureLabs/express-abridged#readme","dependencies":{"body-parser":"^1.18.3","compression":"^1.7.3","cookie-parser":"^1.4.3","express":"^4.16.3","helmet":"^3.16.0","morgan":"^1.9.1"},"peerDependencies":{"@conjurelabs/route":"1.x.x","@conjurelabs/utils":"0.x.x"},"gitHead":"c8476a4a7a35779467d1c0d9f4f17d39376cfed3","_id":"@conjurelabs/express-abridged@1.0.0","_nodeVersion":"12.9.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-vBQOdkQvONZphtrS9DBS1DDbrgLwNWcbYOqNlptnVqTVpXt6ZyzwtFsCvoELvMC0mS/i/dq8LZEpsO2YTXGiKg==","shasum":"2c042ce107dff72af62204d7a0777b4a64bbd338","tarball":"https://registry.npmjs.org/@conjurelabs/express-abridged/-/express-abridged-1.0.0.tgz","fileCount":5,"unpackedSize":6461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5sefCRA9TVsSAnZWagAAqQIP/Rp7C4nuIDVQTW+k1VEr\nK1+GQHgBDs6121g9weXiBjR19ohuPd2UD9Q8EuFiXwlVlWnPSompftgmV6u7\nLAgn00m47N22bvAZM9mKag6EGqsZYt4iPBOv09/lcDqudxGnPNjlfVfOz/1z\nrblBaoqtaWK0h7YDfbzzqGz5uE8TJ4qoI20Lv78NB/O+mu+nF2SRPP1P3c7W\nv9KcarLvwg+xyj229kRS3FGwbdHlMbpv34SxRuQpOSJ+oUwNVXWqI+TQXmmj\nmxKCqYPkl/6tu10Fka9REEGShqYVU0KUIw7SHK5HJoVx/kBnrgNqVbsBbIOP\nY4ToPgMvad8VAieBgcwvyFxTOso1fIxVwEyZt3pZfDLW97cUUGBwRsAMLoWC\n8j7NfA4F8krn78cJVIQ9if8YH/Fv+5BKqKT1RkJlS3Mem/BMIaozQdF5IDR4\nnoHcN8d/oLGRWtVEohvyi9CapC4Xv0Q3wmpqmBbHYXVnr2ng0mNdZQjtmiH4\nMP5WCnobVXcMHFe3kNKAsxeOnuDYjBlKas70OCNN4YxYaR75JeSmDgC1ZRcY\nK3JBt/1ZcLbIihA7fOR8EJxV7mDPnGFFQ6YYtmQbuFNLc/sk2nfThw7a/T6O\n2ErDS9Jc12MChyI+LQhEP5tGWMA2r1Od26wlPw7qaAB0L2b5v3syITAenVnX\nTiVv\r\n=zjP0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBwvO/kh0LJMEVMc0v4cCgDk8XgmtsBygZ6s/yI59UDQIgGLEZrf1uNGBNZ26NN7m6jz/nj5wPYHD62bqcB8dHXI4="}]},"maintainers":[{"name":"tmarshall","email":"timothyjmarshall@gmail.com"}],"_npmUser":{"name":"tmarshall","email":"timothyjmarshall@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-abridged_1.0.0_1592182686829_0.3720208460328982"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-10T23:48:24.713Z","1.0.0-rc1":"2019-03-10T23:48:24.976Z","modified":"2022-04-05T00:54:48.432Z","1.0.0":"2020-06-15T00:58:07.052Z"},"maintainers":[{"name":"tmarshall","email":"timothyjmarshall@gmail.com"}],"description":"express server scaffolding","homepage":"https://github.com/ConjureLabs/express-abridged#readme","repository":{"type":"git","url":"git+https://github.com/ConjureLabs/express-abridged.git"},"bugs":{"url":"https://github.com/ConjureLabs/express-abridged/issues"},"license":"MIT","readme":"# Express Abridged\n\nQuick setup scaffolding for an Express server\n\n## Install\n\n```sh\nnpm -i --save @conjurelabs/route @conjurelabs/utils @conjurelabs/express-abridged\n```\n\n## Usage\n\nAdd a directory of routes, in `./routes` within your project root.\n\n```js\nconst abridged = require('@conjurelabs/express-abridged')\nabridged()\n```\n\nThis will run an Express sever on `:3000`\n\nSee [the route module documenation](https://github.com/ConjureLabs/route#readme) for more deatils on using routes.\n\nRoutes within a `abridged` server can access the `route` module via `@conjurelabs/express-abridged/route`.\n\n```js\n// within './routes/test/get.js'\nconst Route = require('@conjurelabs/express-abridged/route')\n\nconst route = new Route()\n\nroute.push(async (req, res) => {\n  res.send('Hello')\n})\n\nmodule.exports = route\n\n// this will allow a user to GET /test on the running server\n```\n\nSee [a working example](https://github.com/ConjureLabs/express-abridged/tree/master/example).\n\n## Advanced Usage\n\n### Name\n\nYou can set a more specific name for your server. This makes logs more sensical when dealing with multiple servers.\n\n```js\nabridged({\n  name: 'API'\n})\n```\n\n### Routes Directory\n\nBy default `abridged` will crawl routes at `./routes` within the project root. You can override that.\n\n```js\nabridged({\n  routesDir: '/custom/routes/dir'\n})\n```\n\n### Port\n\nBy default `abridged` runs on port `3000`\n\n```js\nabridged({\n  port: 4400\n})\n```\n\n### Adding more Express configuration\n\nAfter `abridged` finishes configuring the express server, you can add your own addidtional config.\n\n```js\nabridged({\n  serverAfterConfig: (server, express) => {\n    server.use(express.static('public'))\n    server.use(passport.initialize())\n    server.use(passport.session())\n  }\n})\n```\n\n### Before server starts\n\nThis is useful for wrapping `.listen` with additional logic, like when wrapping Express in a [Next](https://github.com/zeit/next.js#readme) app.\n\n```js\nabridged({\n  beforeListen: (server, express, done) => {\n    // start next app\n    nextApp\n      .prepare()\n      .then(done)\n  }\n})\n```\n\n### After server starts\n\n```js\nabridged({\n  afterListen: (server, express) => {\n    // ...\n  }\n})\n```\n","readmeFilename":"README.md"}