Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Built a REST Microservice With a Database in 3 Files — and Wrote Zero Code

Описание и применение

Создан REST‑микросервис с SQLite, полностью описанный в трёх конфигурационных файлах HCL без кода приложения. Mycel автоматически генерирует сервер, маршрутизацию, валидацию, трансформацию и ретраи, а также эндпоинты health/metrics/debug.

Задача

Developers spend excessive time writing boilerplate plumbing for microservices, leading to repetitive code for routing, validation, database access, and error handling.

Результат

A production‑ready REST microservice running in two minutes, with CRUD endpoints, validation, data transformation, retries, and built‑in health/metrics/debug, all defined in three configuration files and requiring no application code.

Рабочий процесс

  • 1. Create SQLite database schema via CLI
  • 2. Write three HCL files: config.mycel, connectors/connectors.mycel, flows/flows.mycel
  • 3. Define service name and version in config.mycel
  • 4. Declare connectors for REST API and SQLite database
  • 5. Define flows mapping API operations to database targets
  • 6. (Optional) Add validation, transformation, and error handling blocks inside flows
  • 7. Build or pull Mycel Docker image
  • 8. Run Mycel container mounting config directory and exposing port

Доказательства

Mycel scans the config directory recursively, so the file layout is yours to choose — one file or fifty.

Источник

Now hit the API like any other REST service: ... A working CRUD microservice. Zero lines of Go, JavaScript, or anything else.

Источник

  • Дата записи: 2026-09-06T07:52:26.708Z