{"id":21165967,"url":"https://github.com/peterdee/fastify-generic","last_synced_at":"2025-07-06T03:03:57.057Z","repository":{"id":215154079,"uuid":"725604245","full_name":"peterdee/fastify-generic","owner":"peterdee","description":"Generic Fastify project","archived":false,"fork":false,"pushed_at":"2024-02-05T18:50:01.000Z","size":279,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"release","last_synced_at":"2025-01-21T10:11:14.628Z","etag":null,"topics":["apidoc","docker","fastify","javascript","joi","jsdoc","mongodb","node","node-test-runner","redis"],"latest_commit_sha":null,"homepage":"http://localhost:9999","language":"JavaScript","has_issues":false,"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/peterdee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-30T13:50:32.000Z","updated_at":"2024-07-05T11:50:05.000Z","dependencies_parsed_at":"2024-11-20T14:47:50.666Z","dependency_job_id":"dbda0fc5-25d9-4cd3-9fd0-e51229d94c41","html_url":"https://github.com/peterdee/fastify-generic","commit_stats":null,"previous_names":["peterdee/fastify-generic"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ffastify-generic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ffastify-generic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ffastify-generic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ffastify-generic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterdee","download_url":"https://codeload.github.com/peterdee/fastify-generic/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243615336,"owners_count":20319726,"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":["apidoc","docker","fastify","javascript","joi","jsdoc","mongodb","node","node-test-runner","redis"],"created_at":"2024-11-20T14:47:47.239Z","updated_at":"2025-03-14T16:45:26.991Z","avatar_url":"https://github.com/peterdee.png","language":"JavaScript","readme":"## fastify-generic\n\nGeneric Fastify project with API documentation, API testing, authorization, database connection, Redis caching, etc.\n\nSome of the code is typed with [JSDoc](https://jsdoc.app), but types are not enforced (not using `@ts-check` directive)\n\n### Deploy locally\n\n```shell script\ngit clone https://github.com/peterdee/fastify-generic\ncd ./fastify-generic\nnvm use 20\nnpm ci\n```\n\n### Environment variables\n\nThe `.env` file is required, see [.env.example](.env.example) for details\n\n### Launching the server\n\n##### Without Docker container\n\nLaunch in `development` with hot reloading:\n\n```shell script\nnpm run dev\n```\n\nLaunch in `production`:\n\n```shell script\nnpm start\n```\n\nServer will be available at http://localhost:9999 (port `9999` is a default one, you can change it in `.env` file)\n\n##### With Docker container\n\n*Make sure that application uses port `9999`!*\n\nBuild an image:\n\n```shell script\ndocker build -t fastify-generic .\n```\n\nRun container:\n\n```shell script\ndocker run -p 9999:9999 -d fastify-generic\n```\n\nServer will be available at http://localhost:9999\n\n### API documentation\n\nAPI documentation is generated using [apiDoc](https://www.npmjs.com/package/apidoc)\n\nIn order to generate documentation, `apiDoc` should be installed globally:\n\n```shell script\nnpm i -g apidoc\n```\n\nGenerate documentation:\n\n```shell script\nnpm run docs\n```\n\nDocumentation will be available at [http://localhost:9999/docs/](http://localhost:9999/docs/) once you start the server, however it will be served only if `APP_ENV` environment variable is set to `development`\n\n### Testing\n\nTests are done with [`node:assert`](https://nodejs.org/api/assert.html) and [`node:test`](https://nodejs.org/api/test.html)\n\nTests are using [`mongodb-memory-server`](https://www.npmjs.com/package/mongodb-memory-server) to emulate MongoDB connection, but there are no emulation for Redis (currently no modules are available for that): when tests are running, the app will try to connect to the Redis server specified by the `REDIS_TEST_CONNECTION_STRING` environment variable\n\nRun all tests:\n\n```shell script\nnpm run test\n```\n\nIt is possible to run a specific test (for example just a single controller test):\n\n```shell script\nexport APP_ENV=testing \u0026\u0026 node --test ./apis/me/controller.test.js\n```\n\n### Linting\n\nUsing [ESLint](https://eslint.org)\n\n### License\n\n[MIT](./LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdee%2Ffastify-generic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterdee%2Ffastify-generic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdee%2Ffastify-generic/lists"}