{"id":17444426,"url":"https://github.com/jameskyburz/server-base","last_synced_at":"2025-04-30T09:00:20.994Z","repository":{"id":2617257,"uuid":"46997885","full_name":"JamesKyburz/server-base","owner":"JamesKyburz","description":"base for micro services or simple servers","archived":false,"fork":false,"pushed_at":"2023-02-27T07:59:53.000Z","size":1388,"stargazers_count":7,"open_issues_count":13,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-02T16:05:40.573Z","etag":null,"topics":["fasthttp","fasthttprouter","http","http-framework","microservices","nodejs","server","server-base","server-base-logger"],"latest_commit_sha":null,"homepage":"http://npm.im/server-base","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JamesKyburz.png","metadata":{"files":{"readme":"readme.markdown","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,"governance":null}},"created_at":"2015-11-27T20:18:33.000Z","updated_at":"2023-01-03T10:55:58.000Z","dependencies_parsed_at":"2023-07-05T17:15:37.240Z","dependency_job_id":null,"html_url":"https://github.com/JamesKyburz/server-base","commit_stats":null,"previous_names":[],"tags_count":170,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Fserver-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Fserver-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Fserver-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesKyburz%2Fserver-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesKyburz","download_url":"https://codeload.github.com/JamesKyburz/server-base/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232954257,"owners_count":18602149,"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","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":["fasthttp","fasthttprouter","http","http-framework","microservices","nodejs","server","server-base","server-base-logger"],"created_at":"2024-10-17T17:25:00.146Z","updated_at":"2025-01-07T23:34:01.601Z","avatar_url":"https://github.com/JamesKyburz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# server base\n\nbase for micro services or simple servers\n\n[![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/feross/standard)\n[![build status](https://github.com/JamesKyburz/server-base/actions/workflows/main.yml/badge.svg)](https://github.com/JamesKyburz/server-base/actions/workflows/main.yml)\n[![downloads](https://img.shields.io/npm/dm/server-base.svg)](https://npmjs.org/package/server-base)\n\n### usage\n\n```javascript\nconst service = require('server-base')\nservice({\n  '@setup': (ctx, router) =\u003e {\n    ctx.use([\n      (req, res, next) =\u003e next()\n    ])\n    ctx.onError([\n      (req, res, error, next) =\u003e next()\n    ])\n  },\n  '/graphql': {\n    get (req, res) {\n      res.end('html')\n    },\n    async post (req, res) {\n      const query = await req.json()\n      res.json({})\n    }\n  }\n})\n.start(5000)\n```\n\n### router\n\nSee [server-base-router](https://github.com/JamesKyburz/server-base/tree/master/packages/server-base-router) for details.\n\nSee [server-base-router-tests](https://github.com/JamesKyburz/server-base/tree/master/packages/server-base-router/test) for details.\n\n### logger\n\nSee [server-base-log](https://github.com/JamesKyburz/server-base/tree/master/packages/server-base-log) for details.\n\n### .env\n\nIf a .env file exists it will load the values into process.env using [dotenv](https://npm.im/dotenv).\n\n```dosini\nPORT=1900\n```\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install server-base\n```\n\n# license\n[Apache License, Version 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameskyburz%2Fserver-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjameskyburz%2Fserver-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameskyburz%2Fserver-base/lists"}