{"_id":"@aexol/syncano-middleware","_rev":"14-c42aa457d79475d6a2ff7039d95cb020","name":"@aexol/syncano-middleware","dist-tags":{"latest":"0.1.8"},"versions":{"0.1.0":{"name":"@aexol/syncano-middleware","version":"0.1.0","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.0","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"13493600df5b476e38cbb1ea23ebd7d99946f23d","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.0.tgz","fileCount":13,"integrity":"sha512-JNaoelLD2SMIHHgUAsAsK8Pc241m1N6IMpRVnTfNT0GmbKCe9k4W9bpe1bXvDXKdMfueP/q2sMrQUwtYysB6jA==","signatures":[{"sig":"MEYCIQCcIyCXYAMRz9U/hVyGZlO4f2ul4wSmPvZgc7k9H5oBvQIhAK+oRjuMeawbq4ETsctCbUA680exiX9GGzl8L19eFC/b","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12969},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"73d5b008aec60ddfdc8d07db90fa033c3ce14998","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.6.0","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.5.0","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^4.0.36","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.0_1519307640910_0.4958800724413275","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@aexol/syncano-middleware","version":"0.1.2","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.2","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"94d4e025852e967aebb301c74e23d300053d2793","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.2.tgz","fileCount":13,"integrity":"sha512-BAqEkzHe3ZwvfLZ6fdGRrao2UbwsCopMvbSVgHcREeT06Xus0Tu2gnoRiJYPfi9N0sApebGkc5ACIiSNlhRwXQ==","signatures":[{"sig":"MEQCIDqIo4w7F0bPPBkzNakA1B05cU7Conf15IMh5tAxrr23AiBTc8/AK2PrRKC8eJColwikQT2GpCbCaRQmjUwwmbCvTQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12968},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"38283d849eedcd559c6578f876650820f7586b65","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.6.0","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.5.0","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.9.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^9.4.6","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.2_1519380217847_0.4837694897894105","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@aexol/syncano-middleware","version":"0.1.3","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.3","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"3ec0997a9015b18a814d46258920c3b9bc57a3e3","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.3.tgz","fileCount":13,"integrity":"sha512-5kMNdwwL4ws7KWHTA/1BUUz9pgEfDbj+XTLs1W5glYAGi+KDU4JfZuGCW1keWKDHspBX8PdRtkY92lGfmpSVNQ==","signatures":[{"sig":"MEQCIA9rwEph2n5P4/6Zqd7WI+oBdfZaIlb5/T2EuU/q82ffAiB1V1AwARRqO6fOFnpy2Xf0wY/pGJ6+hGBNM865yaTk1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12970},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"0d59ca211d55ba59f9940c87967b1bb360e3b927","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.6.0","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.5.0","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.9.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^9.4.6","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.3_1519380977391_0.2002420740500026","host":"s3://npm-registry-packages"}},"0.1.4":{"name":"@aexol/syncano-middleware","version":"0.1.4","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.4","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"1a0f49629acc3c40476a12c74bde81b1d4d4f80c","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.4.tgz","fileCount":13,"integrity":"sha512-OI4nodac5PzA53qFs3ZQL2uEw4hmaSUn44PJw5XxFguEH3dA64Waa5RppwJyoyPc9FBe4M+BdyqoPOv3Lrn5sA==","signatures":[{"sig":"MEUCIQCcFjImz68riJ0/VmlJTq3Oh1WxtHGSxb6M5KPjfTcrnQIgFGF9ZDReszM1KCljXuLFd6iY+HMM4FHJORzBzTFe9YU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13088},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"319c778a14927565e208b0be5d5ab049a4821bc6","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.6.0","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.5.0","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.9.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^9.4.6","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.4_1519383806602_0.042797940792961064","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"@aexol/syncano-middleware","version":"0.1.5","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.5","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"b77d91bb5838def23183fbc7694a48f54198ba16","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.5.tgz","fileCount":13,"integrity":"sha512-9E1DsxKV+0X+aVZogchtRjo2PNAJDXAaeJRjsnoK559RF4gdAtzt3jFT7wZlrQW1zYtwlTvgHBVlgEdO2hiQ6w==","signatures":[{"sig":"MEYCIQDKXORLi7pbIO50vuZWWz5h+vSL8rS79OF21hvAF87nVwIhAILA5kAFzpAxGmN2Q1KtY6qDVyRuZsOBiXyVsP8YvzVm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13361},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"d7e8e35f7c210b330ddbab8f26d9e8d7060a9495","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.6.0","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.5.0","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.9.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^9.4.6","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.5_1519386105247_0.4093554392071945","host":"s3://npm-registry-packages"}},"0.1.6":{"name":"@aexol/syncano-middleware","version":"0.1.6","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.6","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"c1ba63138899127fd15f95611c296dbb6563d1c9","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.6.tgz","fileCount":13,"integrity":"sha512-IdkZRupWRSOrFeTVXrMS4buBpvjs/6rmaYBKLxO9COfws7bQojGNPUQSJe+X9yPQ0hdMj2r6TKLbddt5xhmRFA==","signatures":[{"sig":"MEQCIA6n8xLThxapDKED5zcm/AEXWcVby5HuV1hzTbT+Quz/AiBoyMocLzRsPatA7SMOEenE9JuOiX1nCu/48Q6qA0imWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13420},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"aa6243e65e19e4bea2913263f665f66daea5e8a3","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.6.0","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.5.0","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.9.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^9.4.6","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.6_1519389603880_0.3836754932195139","host":"s3://npm-registry-packages"}},"0.1.7":{"name":"@aexol/syncano-middleware","version":"0.1.7","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.7","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"eb6e892fa9085be1391101e4d48a6562daae2f18","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.7.tgz","fileCount":13,"integrity":"sha512-NzuOScZ0XMdCpADshiNns4HyL5ROh9NledIoAr2I+Xd61/5bgl2c4jTtcbajvQ1LhKn7LuCtqIBQKdMBqnSk8A==","signatures":[{"sig":"MEUCIH5c8Pn0y+jVdI5JVjE9iRNNWMNCwg+Fc3oFg+H/JEGAAiEA4U1+Me05Ac4wPu8hLGAe9O9ZI2rh7KTN3HMoUKltEHw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13533},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"227955c64a79615aaa62bca672ba65b297ea77e9","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.6.0","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.6.1","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.9.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^9.4.6","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.7_1519918154927_0.8965599107408573","host":"s3://npm-registry-packages"}},"0.1.8":{"name":"@aexol/syncano-middleware","version":"0.1.8","author":{"name":"Aexol"},"license":"MIT","_id":"@aexol/syncano-middleware@0.1.8","maintainers":[{"name":"aexol","email":"aexol@aexol.com"}],"homepage":"https://github.com/aexol/syncano-middleware#readme","bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"dist":{"shasum":"18b011245e921caa898c17dcc5b311cc4393600a","tarball":"https://registry.npmjs.org/@aexol/syncano-middleware/-/syncano-middleware-0.1.8.tgz","fileCount":11,"integrity":"sha512-79SuhT2GmshfbZkHBBV4g4NXcPlrE5DgDNfJi9s59Y33D9Nqxi4io9enSJpHUGAjWQt6Qv/yPJWAmFMs+EtMpg==","signatures":[{"sig":"MEYCIQD8j9OMqXTskwhgIt2+ftCH6KTAeYQSvEdc+JZIpFiULAIhANaulsPn+0sDa6pk/mlGyjeoSJluJDmaO3VIkF4d+9Cq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11842},"jest":{"testRegex":"(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"main":"lib/middleware.js","types":"lib/middleware.d.ts","gitHead":"548392d8c6def6fadeecd0808e68a63441c31494","private":false,"scripts":{"test":"jest","build":"rm -rf lib && tsc","prepack":"npm run test","prepare":"npm run build"},"_npmUser":{"name":"aexol","email":"aexol@aexol.com"},"repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"_npmVersion":"5.7.1","description":"Syncano middleware helper","directories":{},"_nodeVersion":"9.6.1","dependencies":{"lodash.get":"^4.4.2","@syncano/core":"^0.9.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.3.0","tslint":"^5.9.1","ts-jest":"^22.0.4","typescript":"^2.7.1","@types/jest":"^22.1.2","@types/node":"^9.4.6","@types/lodash.get":"^4.4.3","@types/node-fetch":"^1.6.7"},"_npmOperationalInternal":{"tmp":"tmp/syncano-middleware_0.1.8_1523610808662_0.11689597928660889","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-02-22T13:54:00.832Z","modified":"2026-04-03T08:10:35.929Z","0.1.0":"2018-02-22T13:54:00.975Z","0.1.2":"2018-02-23T10:03:37.927Z","0.1.3":"2018-02-23T10:16:17.498Z","0.1.4":"2018-02-23T11:03:26.821Z","0.1.5":"2018-02-23T11:41:45.320Z","0.1.6":"2018-02-23T12:40:03.958Z","0.1.7":"2018-03-01T15:29:15.009Z","0.1.8":"2018-04-13T09:13:28.716Z"},"bugs":{"url":"https://github.com/aexol/syncano-middleware/issues"},"author":{"name":"Aexol"},"license":"MIT","homepage":"https://github.com/aexol/syncano-middleware#readme","repository":{"url":"git+https://github.com/aexol/syncano-middleware.git","type":"git"},"description":"Syncano middleware helper","maintainers":[{"email":"aexol@aexol.com","name":"arturczemiel"},{"email":"ania@aexol.com","name":"ania-aexol"},{"email":"office@aexol.com","name":"aexol-office"},{"email":"kamil@aexol.com","name":"kamil-aexol"}],"readme":"# Syncano middleware\n\n## About\n\nSimple library easing writing of reusable middlewares for socket.\n\n## Installation\n\n```sh\n$ npm install @aexol/syncano-middleware\n```\n\n## Usage\n\nsocket.yml\n```yaml\nname: example\ndescription: Description of example\nversion: 0.0.1\nruntime: nodejs_v8\nendpoints:\n  file: example.js\n  response:\n    success:\n      mimetype: application/json\n      exit_code: 200\n```\n\nsrc/example.js\n```javascript\nimport serve, {response} from '@aexol/syncano-middleware';\n\nasync function run(ctx, syncano) {\n    return response.success({message: 'Hello world!'})\n}\n\nexport default ctx => serve(ctx, run)\n```\n\n### Writing new middleware\n\nsocket.yml\n```yaml\nname: example\ndescription: Description of example\nversion: 0.0.1\nruntime: nodejs_v8\nendpoints:\n  file: example.js\n  response:\n    success:\n      mimetype: application/json\n      exit_code: 200\n    forbidden:\n      mimetype: application/json\n      exit_code: 403\n```\n\nsrc/utils.js\n```javascript\nimport {response} from '@aexol/syncano-middleware';\n\nexport function loggedIn(fn) {\n    return async (ctx, syncano) => {\n        if(!ctx.meta.user) {\n            return response.forbidden({message: 'You must be logged in to perform this action.'})\n        }\n        return fn(ctx, syncano)\n    }\n}\n```\n\nsrc/example.js\n```javascript\nimport serve, {response} from '@aexol/syncano-middleware';\nimport {loggedIn} from './utils'\n\nasync function run(ctx, syncano) {\n    return response.success({message: 'Hello world!'})\n}\n\nexport default ctx => serve(ctx, loggedIn(run))\n```\n\n### cleanExit middleware\n\nThis library comes with built-in cleanExit middleware which handles exceptions raised by the socket script.\n\n#### Example\n\nsocket.yml\n```yaml\nname: example\ndescription: Description of example\nversion: 0.0.1\nruntime: nodejs_v8\nendpoints:\n  file: example.js\n  response:\n    success:\n      mimetype: application/json\n      exit_code: 200\n    serverError:\n      mimetype: application/json\n      exit_code: 500\n```\n\nsrc/example.js\n```javascript\nimport serve, {response, cleanExit} from '@aexol/syncano-middleware';\n\nasync function run(ctx, syncano) {\n    return response.success({message: 'Hello world!'})\n}\n\nexport default ctx => serve(ctx, cleanExit(run))\n```","readmeFilename":"README.md"}