{"id":23079720,"url":"https://github.com/aaronksaunders/hono-drizzle-node-app-1","last_synced_at":"2025-04-03T13:34:28.351Z","repository":{"id":268340286,"uuid":"903993778","full_name":"aaronksaunders/hono-drizzle-node-app-1","owner":"aaronksaunders","description":"Hono JS Drizzle ORM Template","archived":false,"fork":false,"pushed_at":"2024-12-20T05:38:53.000Z","size":297,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T02:32:09.343Z","etag":null,"topics":["better-sqlite3","drizzle-orm","drizzleorm","hono-js","honojs","javascript","sqlite"],"latest_commit_sha":null,"homepage":"https://youtu.be/dWGsvnjcgCw","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/aaronksaunders.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-16T03:35:27.000Z","updated_at":"2025-01-06T02:00:03.000Z","dependencies_parsed_at":"2024-12-16T07:20:02.415Z","dependency_job_id":"67840fa2-e253-4da2-a34a-8dd1a071ff2c","html_url":"https://github.com/aaronksaunders/hono-drizzle-node-app-1","commit_stats":null,"previous_names":["aaronksaunders/hono-drizzle-node-app-1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fhono-drizzle-node-app-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fhono-drizzle-node-app-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fhono-drizzle-node-app-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronksaunders%2Fhono-drizzle-node-app-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronksaunders","download_url":"https://codeload.github.com/aaronksaunders/hono-drizzle-node-app-1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247010189,"owners_count":20868670,"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":["better-sqlite3","drizzle-orm","drizzleorm","hono-js","honojs","javascript","sqlite"],"created_at":"2024-12-16T12:48:44.481Z","updated_at":"2025-04-03T13:34:28.321Z","avatar_url":"https://github.com/aaronksaunders.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hono Drizzle Node App\n\n- Blog Post - https://dev.to/aaronksaunders/getting-started-with-hono-js-and-drizzle-orm-2g6i\n- Video - https://www.youtube.com/watch?v=dWGsvnjcgCw\n\n## Installation\n\nTo install the necessary dependencies, run:\n\n```\nnpm install\nnpm run dev\n```\n\n## Running the Application\n\nSet up the environment variables:\n\n```\nDATABASE_URL=sqlite.db\n```\n\nTo start the development server, use the following command:\n\n```\nnpm run dev\n```\n\nThe server will be running on `http://localhost:3000`.\n\n## API Endpoints\n\n### Users Route\n\n- **GET** `/users` - Retrieve all users.\n- **POST** `/users` - Create a new user. Requires a JSON body with `name`, `age`, and `email`.\n- **GET** `/users/:id` - Retrieve a user by ID.\n- **PUT** `/users/:id` - Update a user by ID. Requires a JSON body with `name`, `age`, and `email`.\n- **DELETE** `/users/:id` - Delete a user by ID.\n\n## Accessing the Application\n\nOpen your browser and navigate to:\n\n```\nhttp://localhost:3000\n```\n\nYou can also use tools like Postman or curl to interact with the API endpoints.\n\n## Development Workflow\n\n1. **Set Up Environment Variables**: Ensure you have your environment variables set up in a `.env` file. For example:\n\n   ```\n   DATABASE_URL=sqlite.db\n   ```\n\n2. **Install Dependencies**: Run the following command to install all necessary dependencies:\n\n   ```\n   npm install\n   ```\n\n3. **Run Database Migrations**: If you have made changes to the database schema, run the migration command:\n\n   ```\n   npm run db:migrate\n   ```\n\n4. **Generate Database Schema**: To generate the database schema based on your models, use:\n\n   ```\n   npm run db:generate\n   ```\n\n5. **View Database**: To view the database, use the following command:\n\n   ```\n   npx drizzle-kit studio\n   ```\n\n6. **Start the Development Server**: Use the following command to start the server:\n\n   ```\n   npm run dev\n   ```\n\n7. **Testing the API**: Use tools like Postman or curl to test the API endpoints as described in the API Endpoints section.\n\n8. **Stopping the Server**: To stop the server, simply interrupt the process in your terminal (usually Ctrl + C).\n\n9. **Version Control**: Make sure to commit your changes regularly and push to your repository to keep your work backed up.\n\n## 🔗 Helpful Links\n\n- Hono - https://hono.dev/\n- Drizzle - https://orm.drizzle.team/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronksaunders%2Fhono-drizzle-node-app-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronksaunders%2Fhono-drizzle-node-app-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronksaunders%2Fhono-drizzle-node-app-1/lists"}