{"_id":"@bottlejs/bottle.js","_rev":"3-64dc7d42a78084570ef9c2d5002af42f","name":"@bottlejs/bottle.js","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@bottlejs/bottle.js","version":"0.0.1","description":"A fast and lightweight Node.js HTTP server framework.","main":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bottlejs/bottle.js.git"},"keywords":["https"],"author":{"name":"Sawyer"},"license":"MIT","bugs":{"url":"https://github.com/bottlejs/bottle.js/issues"},"homepage":"https://github.com/bottlejs/bottle.js#readme","devDependencies":{"@types/node":"^14.11.2"},"directories":{"test":"tests"},"dependencies":{},"gitHead":"3ed49d45552342277cfb8b06ecabfcc7a38663eb","_id":"@bottlejs/bottle.js@0.0.1","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-s9evaVT1SY0Wyl4CHt1W1p960ClD7NNFFOyAe+3uYJV3CPcdbT2XFpW+qqLtJbgex5djAEXYwn86c0tcu7SgqA==","shasum":"d48b74fb6fd05b540a4a769d4a0574c13e5c75f0","tarball":"https://registry.npmjs.org/@bottlejs/bottle.js/-/bottle.js-0.0.1.tgz","fileCount":12,"unpackedSize":11275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeWNJCRA9TVsSAnZWagAA/bQQAIoPuYuadM8LuOKQoP15\naTAWe5QwofYcLEhnABtlbpcWvvYj1QbMWGTevhzBCJrhxXFS5gEXKJtyYn/H\n8iSNVyVEicYiQW+VQ59UQc2+nSTI1jZHKcwP2oWGpn0cnefqEKb+hPgoK2yQ\nD4F4voJUUbuMCH4TGInoIrHob7dbyGgF9xVO3d85aTYaIaUKssFccnLehESB\nyT1eywmeAsp2wVArD8tGZ9Rtvb7clJeWP+3YFZnmjNlpnPQ6vxk+D6kGpamc\nfpw/0S6ddLOyq/+d+QASvaHY11Zpv2vCOZKRyvUOUQtDYNJjJHKXbmS/HWm6\nEfZaskIhuBaxDj3VyaqcuPdgqO8MO1HXJs0BN7fFbyUEgdeSIcnIt9UjNPyI\nsmV+g/esFXboGoE2byohOMbM+HJXdngBu6ZIq8glXTi2kMG3qG89Ojnn1sl/\nUepbew5WAuW2IeobKTeiGADKIQX3IVQT5HzhwglaYQ8GZjQ5u0JDb1rawJCu\nhLJQwl4sNR+acGLl0BsWyQUmBy8keTKTwSowAFdWuboYfREqARHCpLgJhEqk\nCS+wG2cLZUBkUsl1v6jVoyRJSKgA7WRLIPvbRiei4acgt6Bluliz1Da6gq+n\nOkeAo5oAn2vgVAR3UqoGjN8n+4ro+auWhGoqUWxIyYeBL4y51var1m678kZo\nVkPo\r\n=GSbf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJMM7+hZOJQiYh9RBHO1sH92kn8jAPXJZlToaCzBQ+mgIhAI7I6ffr0ZVfpo1sgRvECfB04tFk6mvO/biUFIWQW4w6"}]},"maintainers":[{"name":"trqckpady","email":"570000826@nlrsd.org"}],"_npmUser":{"name":"trqckpady","email":"570000826@nlrsd.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bottle.js_0.0.1_1601790792488_0.35144840725954984"},"_hasShrinkwrap":false},"0.0.2":{"name":"@bottlejs/bottle.js","version":"0.0.2","description":"A fast and lightweight Node.js HTTP server framework.","main":"dist/index.js","scripts":{"test":"nodemon ./tests/test.js","build":"tsc ./src/index.ts --outDir ./dist"},"repository":{"type":"git","url":"git+https://github.com/bottlejs/bottle.js.git"},"keywords":["https"],"author":{"name":"Sawyer"},"license":"MIT","bugs":{"url":"https://github.com/bottlejs/bottle.js/issues"},"homepage":"https://github.com/bottlejs/bottle.js#readme","devDependencies":{"@types/node":"^14.11.2"},"directories":{"test":"tests"},"dependencies":{},"gitHead":"85e46681d63e8d49084cd1dc3dc488ae76b32e5f","_id":"@bottlejs/bottle.js@0.0.2","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-alqdMHdvoh/dpFEAXRyM1h9UWyVKRrZN+VdJ80HlNkHvTOUyhsiKbmMfoZ9hYgSMTmn/bqdkMVuMHSR/TtRusg==","shasum":"a4afdfa57b323a721dea2add6a9633df51d0b028","tarball":"https://registry.npmjs.org/@bottlejs/bottle.js/-/bottle.js-0.0.2.tgz","fileCount":16,"unpackedSize":608266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfenwlCRA9TVsSAnZWagAAUoYP/2QZeU9wT7NiiG6mHnmh\nXYzmclqcBP9vaK0TqYbW2QOZ7C6LEDo0eUzyEyHgOqoFKdA4/Ceo5nwYUOzG\nzU126riPxXFEPuJMvZl+Lx144PV8I8MBESw2frT4raKk9q5iKAinzKOv95IC\nL261+nq1Wf/w3hRtl1nEc8zztzwQtZKtw7PKnc3tq2FuiA+5aAAagIAXrO/a\nx+Ul5RUE5OzxPTyhDSKfKxF4gLaoxtWFtI+tZ/fQ6YbbBpJmsl2uGCNT9/pq\ncKXQepVvGLr5EwAIUk3MGTpFCO+FaWTQNsvJZEoBfjw3Yp1Iubi5DJ9DR7oT\nXEyERcAAUJ0zBIn+oXWRLnS+Z82m09u3XgPyCuerpzy/eDdPxBDCNEgt+M3K\nadW8MfjqcfG2rkwxbu+r4xeE1h2oYTg74kK+1EOtLGga9GHGVsKb7+4ptgRd\n3CrxOLLv0fBmWNO0KGLpliiVe35yT8GRHltxvQfTXQaPLlOlq9RDCZs243L7\nrAqz8Q2gkb0J/gCRIPqKw24+Wk/YGdExG3QF5HSud3zuN22hSyUxhadnWt3k\ngh3xXpWU2iViivOUeM36OOn1GTgyJE7BtdP9XytlTQjP6vxeTzY9L5jO/ivM\nZ2/UWcIQzpcfIGw19SP3xjDiO4TKTsj6Gx7CS+N+/M+lb1d2YXYtZdL6yYQf\nHvNy\r\n=h6JO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+PtMF3Xr06htptcu/YFj49eB1bFc1z30pdMXFRgg+PAiEAvaPvGtQwJz37z9yR2m8pH5yasXsJybNSBH0K1bTOmrA="}]},"maintainers":[{"name":"trqckpady","email":"570000826@nlrsd.org"}],"_npmUser":{"name":"trqckpady","email":"570000826@nlrsd.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bottle.js_0.0.2_1601862692660_0.8755539385138598"},"_hasShrinkwrap":false},"0.0.3":{"name":"@bottlejs/bottle.js","version":"0.0.3","description":"A fast and lightweight Node.js HTTP server framework.","main":"dist/index.js","scripts":{"testserver":"nodemon ./tests/test.js","build":"tsc ./src/index.ts --outDir ./dist","test":"echo no_test"},"repository":{"type":"git","url":"git+https://github.com/bottlejs/bottle.js.git"},"keywords":["https"],"author":{"name":"Sawyer"},"license":"MIT","bugs":{"url":"https://github.com/bottlejs/bottle.js/issues"},"homepage":"https://github.com/bottlejs/bottle.js#readme","devDependencies":{"@types/node":"^14.11.8","nodemon":"^2.0.4"},"directories":{"test":"tests"},"dependencies":{},"gitHead":"a82639a85a5b6da74845ecc8881ac1bfe3bab926","_id":"@bottlejs/bottle.js@0.0.3","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-t3aUmUQP1FFYYihg8FK48m4LmgFUXAvmoNeZKdJr4nfbIrHQI3Lo0r4zJimvQgd7ml/ISOltu+Z6U/64PK3DGw==","shasum":"37264969b47feb41baec232543137664dea660dd","tarball":"https://registry.npmjs.org/@bottlejs/bottle.js/-/bottle.js-0.0.3.tgz","fileCount":18,"unpackedSize":615727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfg6puCRA9TVsSAnZWagAAqYoP/3T2vCg09mXXkdxAtqq9\nkPyUD0hhneOkOo7S22IV7MtBXtqMwhn8/fB+jKuP8aSb/SutF6p9FnZIf4Pu\nNSX1uDbVFGDU5Rwh6OBk5agiEdg3JjzMM0NCW3WyJUcmZl1kJQunCpbbpsCD\nzzhFA1qodeaUQ8J5m62EPiJlgZBnf3U8vPhfYYjRYYN1MBqEuXItpVsDDQai\nBSLF5prSmFUGEvtHUP39vK1N2/NQYQUJ2XJqjqIcGGp7F/UhwNaUCIiVQ8n9\nDu5LDCvInxWVYT0kizhxL+VZTcJi0+bfeN4/EqCOZfccVcWHrX4vY35a79KJ\nVwT9slnu9H4aHYifTfjkZzrsAucpY6Klc8GH5fkDbNRGx0302ea47uw5kkFi\nmME2dTq37Alx2wYP+3I9HeWpqgyPlzhLyo97SNy0u8PxYdeEhWOf0Fj/CO6P\n5r8a0Ma0dzPq0c9UKxqeOf3f1P71FrOi3rvSeWnKuYjLftMIIQdacH347pqR\n18eldWkOdF+bICNzOd0fI5kTLKCuAR06qD614AACQvauyUKog0GucVDw9t+1\nJwD+UZ/RdjdeKjHpG0IFLagSua4GQm5+zceZoeleV2b6aB9kaf5lLMTeKF2X\nHOUdYYEt340e/zuiGyXRpnNbXa2952o6goLIglvW0C8fDAZ6KGoNH1/e+hW8\nhwFP\r\n=m5ja\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJq5hOY6mTHwYnl3HuQ2eD2U0dJBPvpaPv6+G5pmqeXAiA/WzQh02H7RVRwBCeDe3dpiJYFvw8dxmMfqpdP29+R5g=="}]},"maintainers":[{"name":"trqckpady","email":"570000826@nlrsd.org"}],"_npmUser":{"name":"trqckpady","email":"570000826@nlrsd.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bottle.js_0.0.3_1602464365792_0.5533743072410096"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-04T05:53:12.206Z","0.0.1":"2020-10-04T05:53:12.639Z","modified":"2022-04-04T20:15:28.659Z","0.0.2":"2020-10-05T01:51:32.877Z","0.0.3":"2020-10-12T00:59:26.077Z"},"maintainers":[{"name":"trqckpady","email":"570000826@nlrsd.org"}],"description":"A fast and lightweight Node.js HTTP server framework.","homepage":"https://github.com/bottlejs/bottle.js#readme","keywords":["https"],"repository":{"type":"git","url":"git+https://github.com/bottlejs/bottle.js.git"},"author":{"name":"Sawyer"},"bugs":{"url":"https://github.com/bottlejs/bottle.js/issues"},"license":"MIT","readme":"# BottleJS\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbottlejs%2Fbottle.js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbottlejs%2Fbottle.js?ref=badge_shield) ![Repository Size](https://img.shields.io/github/repo-size/bottlejs/bottle.js) ![NPM Version](https://img.shields.io/npm/v/@bottlejs/bottle.js)\n\nBottle.js is a fast and lightweight Node.js HTTP server framework.\n\n### Installation\n\nUsing NPM\n\n```\nnpm i @bottlejs/bottle.js\n```\n\n### Using\n\nUsing bottle.js is easy! All you have to do is initialize the router, then add methods! Heres an example:\n\n`server.js`\n```js\nconst bottle = require('bottle.js');\nconst router = bottle.Router;\n\nrouter.get('/', (req, res) => {\n  res.sendFile(__dirname + '/index.html')\n});\n\nrouter.listen({\n  port: 3000\n}, () => {\n  console.log('Running! :o');\n});\n```\n\n`index.html`\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>Hello, world!</title>\n  </head>\n  <body>\n    <h1>Hello, world!</h1>\n  </body>\n</html>\n```\n\n### Important Features\n\n  - `bottle.Router`: router, used for routing and listening servers\n  - `req.query`: Get the query of a request\n  - `req.body`: Get the body of a request\n  - `res.sendFile(filepath)`: Send a file's contents and headersd as a response\n  - `res.json(json)`: Send json content as a response, good for making APIs\n\n### Dev Tools\n\n  - `typescript`: Great for a better development environment and better output code\n  - `nodemon`: Great for restarting the srver every time the new typescript / file code is recompiled or saved\n  - `visual studio code`: Great IDE for programming\n\n### Notice\n\nPlease note that this project is currently in progress and not all stated features are finished, you should avoid using Bottle.js in production as of this time, thank you.\n\n### For Hacktoberfest:\n\nHey there people coming in looks of getting your Hacktoberfest pull requests up! There are several features that I don't really know how to add but are extremely important to Bottle! Note, you don't have to completely make this on your own! You can just get started and have other build on top of your work and even add more to it later, any contribution helps!\n\n#### Middleware\n\n**NOTE: BASIC SUPPORT FOR MIDDLEWARE HAS BEEN ADDED, YOU CAN STILL ADD ON TO IT**\n\nOne feature that we need is middleware! Middleware would allow for a much better programming enviornment and allowing creators to publish 'extentsions' of the package! Here's an example of how middleware would work:\n\n```js\nconst bottle = require('@bottlejs/bottle.js');\nconst router = bottle.Router;\n\nfunction yourMiddleware(req, res, next) {\n  console.log(req);\n}\n\nrouter.get('/', yourMiddleware, (req, res) => {\n  res.send('hi!');\n});\n\n// listen\n```\n\n#### Template Rendering\n\nThis is another major feature that Bottle is currently missing! This would allow for extentsions that would help with templating your views so you don't have to generate a whole new HTML file using `fs` and whatever other packages may be required. Here's an example of how template rendering would work:\n\n(server.js)\n```js\nconst bottle = require('@bottlejs/bottle.js');\nconst router = bottle.Router;\n\nrouter.renderer(function(req, res, next){\n  // template engine code\n});\n\nrouter.get('/', yourMiddleware, (req, res) => {\n  res.render('file.your_template_language', {message:'This is data!'});\n});\n```\n\n(file.your_template_language)\n```html\n{{message}}\n```\n\n#### Documentation\n\nAs of right now, Bottle has no documentation other than this README file, and that's not a good thing! If you would like to create documentation please create a pull request and add all of your HTML/CSS/JS code into a directory named `docs`! This directory will be reviewed and if the documentation (or the layout0 is good enough we will most likely merge! If you would like to take it a step further you could try and build a Node.js HTTP server (or a Bottle server) in a directory named `webserver` that would take all of the files in the `docs` folder and render them as HTML (from Markdown files) with an auto-generated sidebar.\n\n\n\nMade with ❤️ by @bottlejs & contributors! \n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbottlejs%2Fbottle.js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbottlejs%2Fbottle.js?ref=badge_large)\n","readmeFilename":"README.md"}