{"id":20208041,"url":"https://github.com/gkampitakis/fastify-template-server","last_synced_at":"2025-05-07T07:32:21.137Z","repository":{"id":38190676,"uuid":"300819798","full_name":"gkampitakis/fastify-template-server","owner":"gkampitakis","description":"Template for spinning up a fastify server","archived":true,"fork":false,"pushed_at":"2023-01-08T20:07:11.000Z","size":1122,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T04:52:15.814Z","etag":null,"topics":["docker","fastify","nodejs","server","template","typescript"],"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/gkampitakis.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":"2020-10-03T07:12:56.000Z","updated_at":"2023-04-14T06:26:29.000Z","dependencies_parsed_at":"2023-02-08T07:15:23.736Z","dependency_job_id":null,"html_url":"https://github.com/gkampitakis/fastify-template-server","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Ffastify-template-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Ffastify-template-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Ffastify-template-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Ffastify-template-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkampitakis","download_url":"https://codeload.github.com/gkampitakis/fastify-template-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252833779,"owners_count":21811253,"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":["docker","fastify","nodejs","server","template","typescript"],"created_at":"2024-11-14T05:33:51.975Z","updated_at":"2025-05-07T07:32:20.692Z","avatar_url":"https://github.com/gkampitakis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fastify Template Server\n\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/gkampitakis/fastify-template-server/graphs/commit-activity)\n\n## Description\n\nA template fastify server with basic functionality and structure ready to fork and spin up a server.\n\n## Contents\n\nThis repository is ready to start developing. You can find `controllers` folders where you can register routes and start creating your api.\n\nInside this repo you can find `*.spec` test files and a basic `*.integration` file. In `package.json` it is specified `100%` coverage you can tweak this number to meet your needs.\n\nIn the root folder there is also two Dockerfiles, one for development `Dockerfile.dev` and the `Dockerfile` for production.\n\nYou can find to env file, `.env.example`. You can run `cp .env.example .env` and start working locally.\n\n\u003e ⚠️ .env file is not ported inside Dockerfile\n\nFinally there is a folder `/kubernetes` containing a basic `yaml` file for creating a `Deployment` and `Service` for running your server in Kubernetes.\n\n## Usage\n\n### Locally\n\nIn order to run this server locally you need to install dependencies with `npm install`\nand then `npm run start`.\n\n### Docker\n\nBuild Image:\n\n```bash\ndocker build . -t fastify-template\n# or the dev image\ndocker build . -f Dockerfile.dev -t fastify-template\n```\n\n#### Run Development Image\n\nYou can run development Docker and develop your code in two ways\n\n```bash\ndocker run -p \u003chost-port\u003e:\u003cserver-port\u003e --name fastify-template fastify-template\n# or with live reload support\ndocker run -p \u003chost-port\u003e:\u003cserver-port\u003e --name fastify-template -v /app/node_modules -v ${PWD}:/app fastify-template\n```\n\n### Run Production Image\n\n```bash\ndocker run --rm -p \u003chost-port\u003e:\u003cserver-port\u003e --name fastify-template fastify-template\n```\n\n## Useful Resources\n\n-   [Fastify Example](https://github.com/delvedor/fastify-example)\n    a small but feature complete application build with Fastify and Svelte,which aims to show all the core concepts of Fastify, best practices, and recommendations from one of the creators of Fastify.\n-   [10 Best Practices to containerize NodeJS web application with docker](https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker/).\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkampitakis%2Ffastify-template-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkampitakis%2Ffastify-template-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkampitakis%2Ffastify-template-server/lists"}