{"id":21500726,"url":"https://github.com/lost22git/test-elysia","last_synced_at":"2025-03-17T13:18:39.115Z","repository":{"id":193881052,"uuid":"689350901","full_name":"lost22git/test-elysia","owner":"lost22git","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-13T20:20:05.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T22:46:39.782Z","etag":null,"topics":["bun","cors","elysia","prisma","sqlite","swagger","typebox"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lost22git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-09T14:31:34.000Z","updated_at":"2023-09-30T11:30:12.000Z","dependencies_parsed_at":"2023-10-14T20:28:37.256Z","dependency_job_id":"62ccc955-f9c5-4d9e-9937-8d3c1ed47d34","html_url":"https://github.com/lost22git/test-elysia","commit_stats":null,"previous_names":["lost22git/test-elysia"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lost22git%2Ftest-elysia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lost22git%2Ftest-elysia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lost22git%2Ftest-elysia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lost22git%2Ftest-elysia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lost22git","download_url":"https://codeload.github.com/lost22git/test-elysia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244039231,"owners_count":20387835,"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":["bun","cors","elysia","prisma","sqlite","swagger","typebox"],"created_at":"2024-11-23T17:43:41.078Z","updated_at":"2025-03-17T13:18:39.087Z","avatar_url":"https://github.com/lost22git.png","language":"TypeScript","readme":"# dev app\n\n## install bun\n```shell\nrtx install bun\n\nrtx use -g bun\n```\n\n## create test-elysia project\n```shell\nbun create elysia test-elysia\n\ncd test-elysia\n```\n\n## install prisma\n```shell\nbun install prisma --save-dev \n```\n\n### init prisma\n\n```shell\nbun x prisma init --datasource-provider sqlite\n```\n\n### edit `./prisma/schema.prisma` file\n\n```prisma\n// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider = \"sqlite\"\n  url      = env(\"DATABASE_URL\")\n}\n\nmodel Fighter {\n  id         Int       @id @default(autoincrement())\n  name       String    @unique\n  skill      String\n  created_at DateTime  @default(now())\n  updated_at DateTime?\n\n  @@map(\"fighter\")\n}\n```\n\n### edit .env file\n\n```env\n# Environment variables declared in this file are automatically made available to Prisma.\n# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema\n\n# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.\n# See the documentation for all the connection string options: https://pris.ly/d/connection-strings\n\nDATABASE_URL=\"file:./fighter.db\"\n```\n\n### sync schema to db and generate migrate scripts\n\n```shell\nbun x prisma migrate dev --name init-fighter-schema\n```\n\n\n### generate prisma client code\n\n```shell\nbun x prisma generate\n```\n\n### use PrismaClient in your ts code\n```typescript\nimport { PrismaClient } from '@prisma/client'\n\nconst prisma = new PrismaClient()\n```\n\n\n# run app\n\n## start app with one instance\n```shell\nbun src/index.ts\n```\nor\n\n```shell\nbun start\n```\n\nor \n\n```shell\n./deploy.sh 1\n```\n\n## start app with the specified number of instances\n\n```shell\n# start with 4 instances\n./deploy.sh 4\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flost22git%2Ftest-elysia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flost22git%2Ftest-elysia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flost22git%2Ftest-elysia/lists"}