Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/carlosedp/bleepziohttp

Scala Bleep sample project using ZIO and ZIO-HTTP
https://github.com/carlosedp/bleepziohttp

bleep scala zio zio-http

Last synced: 10 days ago
JSON representation

Scala Bleep sample project using ZIO and ZIO-HTTP

Awesome Lists containing this project

README

        

# Scala Bleep ZIO-HTTP Sample Project

This is a sample project based on ZIO and ZIO-HTTP using Scala [Bleep](https://bleep.build/docs/) build tool which uses a simple, data-only build file written in YAML (`bleep.yaml`) that has no logic or code and is blazing fast.

The project also includes a GitHub Action to run tests automatically serving as a template.

## Pre-Reqs

I recommend [using Coursier](https://get-coursier.io/docs/cli-installation#native-launcher) to manage tooling install.

On Windows, download and install using the [Windows Installer](https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-win32.zip).

```sh
# For Linux
curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" | gzip -d > cs
# For MacOS
curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-apple-darwin.gz | gzip -d > cs

chmod +x cs
./cs setup

# Install Bleep build tool:
cs install --channel https://raw.githubusercontent.com/oyvindberg/bleep/master/coursier-channel.json bleep
```

## Running and Testing

Run the main server with:

```sh
bleep run httpserver
```

Test the project with:

```sh
bleep test
```

To generate the GraalVM native-image binary, use:

```sh
bleep native-image httpserver
```

The generated binary name and path will be printed at the output.