{"id":14969165,"url":"https://github.com/fastify/demo","last_synced_at":"2025-04-09T06:12:54.059Z","repository":{"id":250316878,"uuid":"808659243","full_name":"fastify/demo","owner":"fastify","description":"A concrete example of a Fastify application using what are considered best practices by the Fastify community","archived":false,"fork":false,"pushed_at":"2025-04-01T15:14:25.000Z","size":114,"stargazers_count":80,"open_issues_count":12,"forks_count":19,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-01T16:39:46.038Z","etag":null,"topics":["best-practises","demo","demo-app","fastify","fastify-demo","nodejs","typescript","webframework"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/fastify.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fastify","open_collective":"fastify"}},"created_at":"2024-05-31T14:32:42.000Z","updated_at":"2025-04-01T15:14:27.000Z","dependencies_parsed_at":"2024-08-18T09:22:49.423Z","dependency_job_id":"f8a0fc3b-147b-4262-b4ca-b8676b4fdd7a","html_url":"https://github.com/fastify/demo","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":0.4,"last_synced_commit":"7e524a58b06144ba118ed414cfa880172f9886e4"},"previous_names":["fastify/demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fdemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fdemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fdemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fdemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastify","download_url":"https://codeload.github.com/fastify/demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":["best-practises","demo","demo-app","fastify","fastify-demo","nodejs","typescript","webframework"],"created_at":"2024-09-24T13:41:15.678Z","updated_at":"2025-04-09T06:12:54.041Z","avatar_url":"https://github.com/fastify.png","language":"TypeScript","readme":"# Fastify Official Demo\n\n[![CI](https://github.com/fastify/demo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/demo/actions/workflows/ci.yml)\n\nThe aim of this repository is to provide a concrete example of a Fastify application using what are considered best practices by the Fastify community.\n\n**Prerequisites:** You need to have Node.js version 22 or higher installed.\n\n## Getting started\nInstall the dependencies:\n```bash\nnpm install\n```\n\n### Database\nYou can run a MySQL instance with Docker:\n```bash\ndocker compose up\n```\n\nTo run it in the background:\n```bash\ndocker compose up -d\n```\n\nTo create and update the database schema, run the migrations:\n```bash\nnpm run db:migrate\n```\n\nTo populate the database with initial data, run:\n```bash\nnpm run db:seed\n```\n\n### TypeScript\nTo build the project:\n```bash\nnpm run build\n```\n\n### Start the server\nIn dev mode:\n```bash\nnpm run dev\n```\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nIn production mode:\n```bash\nnpm run start\n```\n\n### Testing\nTo run the tests:\n```bash\nnpm run test\n```\n\n### Standalone\n`dev` and `start` leverage [fastify-cli](https://github.com/fastify/fastify-cli),\nbut you can run the demo as a standalone executable (see [server.ts](./src/server.ts)):\n```bash\nnpm run standalone\n```\n\n### Linting\nTo check for linting errors:\n```bash\nnpm run lint\n```\n\nTo check and automatically fix linting errors:\n```bash\nnpm run lint:fix\n```\n\n## Learn More\nTo learn more about Fastify, check out the [Fastify documentation](https://www.fastify.io/docs/latest/).\n","funding_links":["https://github.com/sponsors/fastify","https://opencollective.com/fastify"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastify%2Fdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastify%2Fdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastify%2Fdemo/lists"}