Skip to content

broggn/madek-api

 
 

Repository files navigation

The Madek API2

The madek-api2 is a JSON API for Madek.

API v2 TODOs

  • Switch HTTP Server to HTTP Kit probably (see Madek audits)
  • CLI Options for HTTP Server

Development

Configuration

Create a config/settings.local.yml with content similar like:

database:
  url: postgresql://localhost:5432/madek_development?pool=3

services:
  api:
    http:
      port: 3100

This assumes that PUSER and PGPASSWORD environment variables are set. Values can be submitted as in the following if this is not the case:

database:
  url: postgresql://localhost:5432/madek_development?pool=3&user=PGUSER&password=PGPASSWORD

Starting up the Server

Either lein run or with-in the REPL (-main). Or ./bin/clj-run

Running the Tests

When the server is running (!)

bundle && ./bin/rspec

Note, there is no special environment as in rails.

Add Dev-Users

Run clojure tests to add two users for development and testing

clj -X:test :dirs '["test"]'

About

Madek discoverable API service based on HTTP/REST and JSON-ROA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 67.8%
  • Ruby 31.8%
  • Other 0.4%