Skip to content

yc-zhang/consumer-profile-api

Repository files navigation

consumer-profile-api

Stylecheck / Test / Coverage

sbt clean scalastyle test:scalastyle testOnly coverageReport

After build the report could be found at target/scala-2.12.

Package & Run

Use sbt-native-packager to create a universal package.

sbt universal:packageBin

And run it locally:

./target/universal/stage/bin/consumer-profile-api

You can also use sbt to run the program like:

sbt run

To verify everything goes well you need:

curl -i http://0.0.0.0:8080/helloworld

Docker support

We will use docker to support people who want to develop this program in any platform or os, so that we introduce docker-compose to setup local env. Also we will use that for testing and package, in short if you have docker on your laptop, you don't need java or scala to support your develop work.

And a the program will release in docker image, of course.

Spells

# Run server in container
docker-compose up dev

# Into a dev environment
docker-compose run dev bash

# in docker env
# run style check etc...
./sbt clean scalastyle test:scalastyle testOnly coverageReport

# and package
./sbt universal:packageBin

Build docker image

./script/build-image.sh

Then you could run the image like:

docker run -p 8080:8080 consumer-profile-api

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published