specbox_api

Version, currently main branch1 version
  • main branchlatestJan 5, 2025

github.com/SpecBox/specbox-api

Backend API for SpecBox a.k.a. WebSpecimanager / 昆虫標本管理サービスWebSpecimanagerの後継プロジェクトSpecBoxのバックエンドAPI

1 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  specbox_api:
    github: SpecBox/specbox-api
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
>= 1.10.1
Target
  • specbox_api from src/specbox_api.cr

Dependencies

Runtime Dependencies

  • jwt*github: crystal-community/jwt
  • jwks*github: place-labs/jwks
  • avram~> 1.3.0github: luckyframework/avram
  • lucky~> 1.3.0github: luckyframework/lucky
  • carbon~> 0.6.0github: luckyframework/carbon
  • postgis*github: fujikawahiroaki/postgis
  • iso_codes~> 0.4.7github: mamantoha/iso_codes
  • lucky_env~> 0.2.0github: luckyframework/lucky_env
  • lucky_task~> 0.3.0github: luckyframework/lucky_task
  • lucky_postgis*github: fujikawahiroaki/lucky_postgis
  • carbon_sendgrid_adapter~> 0.6.0github: luckyframework/carbon_sendgrid_adapter

README

specbox_api

開発

docker-composeによる開発環境構築

テストもDockerコンテナ内で手軽に実行できるように、テスト用のdocker-composeのserviceを用意しています。 また、開発サーバとテストでDBの状態が共有されないように、DBについても開発サーバ用とテスト用のserviceを分けています。

開発サーバ用service postgresとluckyのコンテナが起動し、lucky devが実行されてluckyの開発サーバが起動します。

  • 開発サーバの立ち上げ: docker-compose up lucky または ./server-docker-fore.sh
  • 開発サーバをバックグランドで立ち上げ: docker-compose up -d luck または ./server-docker-daemon.sh

テスト用service テスト用postgresとテスト用luckyのコンテナが起動し、crystal specが実行されます。

  • テストの実行: docker-compose up lucky_test または ./test-docker.sh

docker-compose内のluckyに対するタスク実行

./dc-lucky.sh [options]

luckyコマンドの各タスクをdocker-compose内のluckyに対して実行します。 事前に前述のコマンドによる開発サーバの立ち上げが必要です。

./dc-lucky.sh --help

This is a project written using Lucky. Enjoy!

Learning Lucky

Lucky uses the Crystal programming language. You can learn about Lucky from the Lucky Guides.