todo
Version, currently master branch1 version
- master branchlatestJan 3, 2023
github.com/YotaroSeki/HTTPServer
HTTP server with amber
0 stars
0 dependents
License: UNLICENSED
Installation
# Add this to your shard.yml
dependencies:
todo:
github: YotaroSeki/HTTPServer
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.28.0- License
- UNLICENSED
- Author
- YotaroSeki
- Targets
todofrom src/todo.cramberfrom lib/amber/src/amber/cli.cr
Dependencies
Runtime Dependencies
- pg~> 0.16.1github: will/crystal-pg
- amber0.28.0github: amberframework/amber
- granite~> 0.15.0github: amberframework/granite
- citrine-i18n0.3.2github: amberframework/citrine-i18n
- quartz_mailer~> 0.5.1github: amberframework/quartz-mailer
- jasper_helpers~> 0.2.1github: amberframework/jasper-helpers
Development Dependencies
- garnet_spec~> 0.2.1github: amberframework/garnet-specdev
README
todo API server
set up
- Install Crystal lang
apt install crystal
- Install Amber framework
apt install amber
- Install postgresql
apt install postgres@11
- Edit
config/environments/development.yml
database_url: postgres://#{YOUR_USER_NAME}:@localhost:5432/todo_development
- Create Table and migrate
amber db create migrate
- Run server
amber w
動作
- 最初にlocalhost:3000にアクセスしてユーザー登録およびログインをする必要があります。
# イベント登録 API request
POST /api/v1/event
{"deadline": "2019-06-11T14:00:00+09:00", "title": "レポート提出", "memo": ""}
# イベント登録 API response
200 OK
{"status": "success", "message": "registered", "id": 1}
400 Bad Request
{"status": "failure", "message": "invalid date format"}
# イベント全取得 API request
GET /api/v1/event
# イベント全取得 API response
200 OK
{"events": [
{"id": 1, "deadline": "2019-06-11T14:00:00+09:00", "title": "レポート提出", "memo": ""},
...
]}
# イベント1件取得 API request
GET /api/v1/event/${id}
# イベント1件取得 API response
200 OK
{"id": 1, "deadline": "2019-06-11T14:00:00+09:00", "title": "レポート提出", "memo": ""}
404 Not Found
# イベント1件削除 API request
DELETE /api/v1/event/${id}
# イベント1件取得 API response
204 OK
404 Not Found
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jan 3, 2023
- Crystal
0.28.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/YotaroSeki/HTTPServer
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1