{"id":15713745,"url":"https://github.com/mkdika/kemal-rest-api","last_synced_at":"2025-05-12T23:02:21.752Z","repository":{"id":102258182,"uuid":"262534864","full_name":"mkdika/kemal-rest-api","owner":"mkdika","description":"Simple REST API example with Kemal","archived":false,"fork":false,"pushed_at":"2020-08-02T04:26:45.000Z","size":11,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T04:29:33.154Z","etag":null,"topics":["crud","crystal","crystal-language","example","kemal","rest-api"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/mkdika.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":"2020-05-09T09:23:54.000Z","updated_at":"2023-09-29T19:27:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"153e9c0c-813f-4924-9f71-4865356783c7","html_url":"https://github.com/mkdika/kemal-rest-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fkemal-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fkemal-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fkemal-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fkemal-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkdika","download_url":"https://codeload.github.com/mkdika/kemal-rest-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837406,"owners_count":21971982,"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":["crud","crystal","crystal-language","example","kemal","rest-api"],"created_at":"2024-10-03T21:33:09.827Z","updated_at":"2025-05-12T23:02:21.683Z","avatar_url":"https://github.com/mkdika.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kemal REST API\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](/LICENSE)\n[![Built with Crystal](https://img.shields.io/badge/built%20with-crystal-000000.svg?style=flat-square)](https://crystal-lang.org/)\n[![Build Status](https://travis-ci.org/mkdika/kemal-rest-api.svg?branch=master)](https://travis-ci.org/mkdika/kemal-rest-api)\n\nSimple REST API example with [Kemal](https://kemalcr.com/) micro web framework, in CRUD use cases.\n\n## Features\n\n- [Crecto](https://github.com/Crecto/crecto), Database wrapper and ORM for Crystal.\n- [Micrate](https://github.com/amberframework/micrate), database migration tool for Crystal.\n- Database use PostgreSQL.\n- Test specs example.\n\n## Endpoints\n\n| HTTP Method | Path                | Description                          |\n| ----------- | ------------------- | ------------------------------------ |\n| GET         | /api/customers      | Get all existing customer data       |\n| GET         | /api/customers/:id  | Get existing customer data by Id     |\n| POST        | /api/customers      | Insert new customer data             |\n| PUT         | /api/customers/:id  | update existing customer data by Id  |\n| DELETE      | /api/customers/:id  | Delete existing customer data by Id  |\n\n## Build and run on local\n\nInstall [Crystal](https://crystal-lang.org/install/) language.\n\n```bash\n# Clone the project\ngit clone https://github.com/mkdika/kemal-rest-api.git\ncd kemal-rest-api/\n\n# Install related dependencies\nshards install\n\n# create environment variable, you can adjust your db connection string\nexport DB_URL='postgres://postgres:postgres@localhost:5432/kemal_rest_api'\n\n# Run db setup (create db \u0026 run migrations)\ncrystal run src/util/db_setup.cr\n\n# Run all test specs\ncrystal spec\n\n# Build binary\nshards build --production --release\n\n# run the app\n./bin/server\n# output: [development] Kemal is ready to lead at http://0.0.0.0:3000\n\n# Optionally, run kemal in `production` environmen \u0026 custom port\nKEMAL_ENV=production ./bin/server 80\n# output: [production] Kemal is ready to lead at http://0.0.0.0:80\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mkdika/kemal-rest-api/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Maikel Chandika](https://github.com/mkdika) - creator and maintainer\n\n## Copyright and License\n\nCopyright 2020 Maikel Chandika (mkdika@gmail.com). Code released under the MIT License. See [LICENSE](/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkdika%2Fkemal-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkdika%2Fkemal-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkdika%2Fkemal-rest-api/lists"}