{"id":13300744,"url":"https://github.com/dannysofftie/fastify-graphql","last_synced_at":"2025-03-10T11:33:03.678Z","repository":{"id":110580314,"uuid":"348076493","full_name":"dannysofftie/fastify-graphql","owner":"dannysofftie","description":"Getting started with Prisma (https://prisma.io) GraphQL and Fastify (https://fastify.io) - The Highly performant, extendible Node.js web framework","archived":false,"fork":false,"pushed_at":"2021-09-06T18:45:19.000Z","size":73,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-17T17:40:39.255Z","etag":null,"topics":["fastify","graphql","prisma"],"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/dannysofftie.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}},"created_at":"2021-03-15T18:13:46.000Z","updated_at":"2024-03-07T08:38:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"a839c2b3-2517-4f01-97ef-556b42b2c8f3","html_url":"https://github.com/dannysofftie/fastify-graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannysofftie%2Ffastify-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannysofftie%2Ffastify-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannysofftie%2Ffastify-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannysofftie%2Ffastify-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannysofftie","download_url":"https://codeload.github.com/dannysofftie/fastify-graphql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242843518,"owners_count":20194379,"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":["fastify","graphql","prisma"],"created_at":"2024-07-29T17:43:04.127Z","updated_at":"2025-03-10T11:33:03.663Z","avatar_url":"https://github.com/dannysofftie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Fastify GraphQL API\n\nWritten with [fastify](https://fastify.io) and [typescript](https://www.typescriptlang.org)\n\n### Project setup\n\n1. Clone repo\n   ```bash\n   git clone git@github.com:dannysofftie/fastify-graphl.git\n   ```\n2. Install dependencies\n   ```bash\n   yarn install or npm install\n   ```\n3. Set up environment variables\n\n   Copy `.env.sample` file to `.env` and update the variables\n\n   ```bash\n   cp .env.sample .env\n   ```\n\n4. Run development server\n   ```bash\n   yarn dev or npm run dev\n   ```\n\n### Build for production\n\nAPI is built to run on Docker. To deploy, run the deployment script\n\n```bash\nchmod +x deploy.sh \u0026\u0026 ./deploy.sh\n```\n\nOnce built. the image will be pushed to Docker Hub. Login to your server,\n\n1. Install Docker and Docker Compose\n\n   \u003e Install docker\n\n   ```bash\n    # remove older versions of docker\n   sudo apt-get remove docker docker-engine docker.io containerd runc -y\n\n   # add docker repositories\n   sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y\n\n   # add Docker gpg key\n   curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\n   # set up stable repositories\n   sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs)  stable\" -y\n\n   # install docker\n   sudo apt update \u0026\u0026 sudo apt install docker-ce containerd.io -y\n\n   # add current user to docker group and refresh current shell\n   sudo usermod –aG docker $USER\n\n   # notify user to rerun script again\n   echo -e \"\\n\\e[0;32mAfter entering your password, rerun ./deploy.sh again to proceed\\e[0;39m\\n\"\n\n   # refresh current shell\n   exec su $USER\n   ```\n\n   \u003e Install docker compose\n\n   ```bash\n   # download docker compose\n   sudo curl -L \"https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\n   # make binary executable\n   sudo chmod +x /usr/local/bin/docker-compose\n   ```\n\n2. Pull and spin up the image\n\n   ```bash\n   # Create a folder in your home directory\n   mkdir apps/server\n   # Copy contents of deploy/docker-compose.yml file to docker-compose.yml\n   vi docker-compose.yml\n   # Pull image\n   docker-compose pull\n   # Start application instamce\n   docker-compose up -d\n\n   ```\n\n3. Setting up token signing and verification certificates\n\n   ```bash\n   # create private key\n   openssl genpkey -algorithm RSA -aes256 -out ./private.pem\n\n   # create public key from generated public key\n   openssl rsa -in ./private.pem -pubout -outform PEM -out ./public.pem\n   ```\n\n   Save generated keys in `certs` folder, at the project root. Save them as `private.pem` \u0026 `public.pem`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannysofftie%2Ffastify-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannysofftie%2Ffastify-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannysofftie%2Ffastify-graphql/lists"}