{"id":23107159,"url":"https://github.com/evheniy/yeps","last_synced_at":"2025-08-16T17:31:21.253Z","repository":{"id":57403585,"uuid":"81646848","full_name":"evheniy/yeps","owner":"evheniy","description":"Yet Another Event Promised Server","archived":false,"fork":false,"pushed_at":"2017-12-15T15:28:16.000Z","size":37,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-07T05:20:09.565Z","etag":null,"topics":["async","await","http","http-server","nodejs","promise"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evheniy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-11T10:49:05.000Z","updated_at":"2021-04-09T01:36:08.000Z","dependencies_parsed_at":"2022-09-04T09:22:48.017Z","dependency_job_id":null,"html_url":"https://github.com/evheniy/yeps","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/evheniy/yeps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evheniy%2Fyeps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evheniy%2Fyeps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evheniy%2Fyeps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evheniy%2Fyeps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evheniy","download_url":"https://codeload.github.com/evheniy/yeps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evheniy%2Fyeps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270746145,"owners_count":24638293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","await","http","http-server","nodejs","promise"],"created_at":"2024-12-17T01:12:43.525Z","updated_at":"2025-08-16T17:31:20.986Z","avatar_url":"https://github.com/evheniy.png","language":"JavaScript","readme":"# Yet Another Event Promised Server\n\n\nSimple promised node http request-response handler\n\n[![NPM](https://nodei.co/npm/yeps.png)](https://npmjs.org/package/yeps)\n\n[![npm version](https://badge.fury.io/js/yeps.svg)](https://badge.fury.io/js/yeps)\n[![Build Status](https://travis-ci.org/evheniy/yeps.svg?branch=master)](https://travis-ci.org/evheniy/yeps)\n[![Coverage Status](https://coveralls.io/repos/github/evheniy/yeps/badge.svg?branch=master)](https://coveralls.io/github/evheniy/yeps?branch=master)\n[![Linux Build](https://img.shields.io/travis/evheniy/yeps/master.svg?label=linux)](https://travis-ci.org/evheniy/)\n[![Windows Build](https://img.shields.io/appveyor/ci/evheniy/yeps/master.svg?label=windows)](https://ci.appveyor.com/project/evheniy/yeps)\n\n[![Dependency Status](https://david-dm.org/evheniy/yeps.svg)](https://david-dm.org/evheniy/yeps)\n[![devDependency Status](https://david-dm.org/evheniy/yeps/dev-status.svg)](https://david-dm.org/evheniy/yeps#info=devDependencies)\n[![NSP Status](https://img.shields.io/badge/NSP%20status-no%20vulnerabilities-green.svg)](https://travis-ci.org/evheniy/yeps)\n\n[![Known Vulnerabilities](https://snyk.io/test/github/evheniy/yeps/badge.svg)](https://snyk.io/test/github/evheniy/yeps)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/evheniy/yeps/master/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/evheniy/yeps.svg)](https://github.com/evheniy/yeps/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/evheniy/yeps.svg)](https://github.com/evheniy/yeps/network)\n[![GitHub issues](https://img.shields.io/github/issues/evheniy/yeps.svg)](https://github.com/evheniy/yeps/issues)\n[![Twitter](https://img.shields.io/twitter/url/https/github.com/evheniy/yeps.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:\u0026url=%5Bobject%20Object%5D)\n\n    \n## How to install\n\n    npm i -S yeps\n\n## How to use\n\n#### app.js\n\n    const App = require('yeps');\n    \n    const app = module.exports = new App();\n    \n    app.then(async (ctx) =\u003e {\n      ctx.res.statusCode = 200;\n      ctx.res.setHeader('Content-Type', 'application/json');\n      ctx.res.end('{\"status\":\"OK\"}');\n    });\n    \n    app.catch(async (error, ctx) =\u003e {\n      ctx.res.statusCode = 500;\n      ctx.res.setHeader('Content-Type', 'application/json');\n      ctx.res.end(JSON.stringify({ error }));\n    });\n\n#### bin/www\n\n    #!/usr/bin/env node\n    \n    const http = require('http');\n    const app = require('../app');\n\n    http\n      .createServer(app.resolve())\n      .listen(parseInt(process.env.PORT || '3000', 10));\n    \n#### package.json\n\n    \"scripts\": {\n      \"start\": \"node bin/www\"\n    }\n    \n## Breaking chain\n\n    app.then(async (ctx) =\u003e {\n      ctx.res.statusCode = 200;\n      ctx.res.setHeader('Content-Type', 'application/json');\n      ctx.res.end('{\"status\":\"OK\"}');\n      \n      return Promise.reject();\n    }).then(async () =\u003e {\n      // it won't work\n    }).catch(async () =\u003e {\n      // it won't work\n    });\n    \n## Using router\n\n    npm i -S yeps-router\n    \n#### app.js\n\n    const App = require('yeps');\n    const Router = require('yeps-router');\n    \n    const app = module.exports = new App();\n    const router = new Router();\n    \n    router.get('/').then(async (ctx) =\u003e {\n      ctx.res.statusCode = 200;\n      ctx.res.setHeader('Content-Type', 'application/json');\n      ctx.res.end('{\"status\":\"OK\"}');     \n    });\n    \n    app.then(router.resolve());\n    \n## Using server\n\n    npm i -S yeps-server\n    \n#### bin/www\n\n    #!/usr/bin/env node\n        \n    const server = require('yeps-server');\n    \n    const app = require('../app');\n    \n    server.createHttpServer(app);\n    \n## Error handler\n\n    npm i -S yeps-error yeps-logger\n    \n#### app.js\n\n    const App = require('yeps');\n    \n    const error = require('yeps-error');\n    const logger = require('yeps-logger');\n    \n    const app = module.exports = new App();\n    \n    app.all([\n      error(),\n      logger(),\n    ]);\n    \n\n#### [YEPS documentation](http://yeps.info/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevheniy%2Fyeps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevheniy%2Fyeps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevheniy%2Fyeps/lists"}