Skip to content

Honyrik/opa-service

Repository files navigation

Installation

$ yarn install

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

Curl

curl -X 'POST' \
  'http://localhost:3000/execute' \
  -H 'accept: */*' \
  -H 'Content-Type: multipart/form-data' \
  -F '[email protected];type=application/json' \
  -F 'input=@input_2.json;type=application/json' \
  -F 'policy=@pkg_utilitu.rego' \
  -F '[email protected]' \
  -F '[email protected];type=application/json' \
  -F 'query=result := data' \
  -F 'resultPath=result.*.bindings.result'

Swagger url

http://localhost:3000/apiDoc

Alt text Alt text

Docker

docker build -t opa-service:dev .
docker run --name some-opa-service -p 3000:3000 -d opa-service:dev

License

Opa Service is MIT licensed.

About

Rego api service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published