https://github.com/lagenorhynque/route-guide
Route Guide, an example gRPC API based on Protojure, Pedestal & Duct (ported from https://github.com/grpc/grpc/tree/v1.34.0/examples/python/route_guide)
https://github.com/lagenorhynque/route-guide
clojure duct grpc pedestal protojure
Last synced: 2 months ago
JSON representation
Route Guide, an example gRPC API based on Protojure, Pedestal & Duct (ported from https://github.com/grpc/grpc/tree/v1.34.0/examples/python/route_guide)
- Host: GitHub
- URL: https://github.com/lagenorhynque/route-guide
- Owner: lagenorhynque
- Created: 2021-01-02T18:34:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-25T11:12:28.000Z (over 2 years ago)
- Last Synced: 2024-04-14T07:22:53.004Z (about 2 years ago)
- Topics: clojure, duct, grpc, pedestal, protojure
- Language: Clojure
- Homepage: https://qiita.com/lagenorhynque/items/f285c7e44a7dd72fb2be
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# route-guide
[](https://circleci.com/gh/lagenorhynque/route-guide)
Route Guide, an example gRPC API based on [Protojure](https://github.com/protojure/lib), [Pedestal](https://github.com/pedestal/pedestal) & [Duct](https://github.com/duct-framework/duct) (ported from https://github.com/grpc/grpc/tree/v1.34.0/examples/python/route_guide).
## Developing
### Prerequisites
- [Java (JDK)](http://openjdk.java.net/)
- `java --version` >= 11
- [Leiningen](https://leiningen.org/)
### Setup
When you first clone this repository, run:
```sh
lein duct setup
```
This will create files for local configuration, and prep your system
for the project.
### Development environment
To begin developing, start with a REPL.
```sh
lein repl
```
With [rebel-readline](https://github.com/bhauman/rebel-readline):
```sh
$ lein rebel
```
Then load the development environment.
```clojure
user=> (dev)
:loaded
```
Run `go` to prep and initiate the system.
```clojure
dev=> (go)
:initiated
```
By default this creates a web server at .
When you make changes to your source files, use `reset` to reload any
modified files and reset the server.
```clojure
dev=> (reset)
:reloading (...)
:resumed
```
### Production build & run
```sh
$ lein uberjar
$ java -jar target/route-guide.jar
```
### Testing
Testing is fastest through the REPL, as you avoid environment startup
time.
```clojure
dev=> (test)
...
```
But you can also run tests through Leiningen.
```sh
lein test
```
with [cloverage](https://github.com/cloverage/cloverage):
```sh
$ lein test-coverage
# Open the coverage report
$ open target/coverage/index.html
```
### Linting
- [`eastwood`](https://github.com/jonase/eastwood)
```sh
$ lein lint
```
- [`cljstyle check`](https://github.com/greglook/cljstyle), [`clj-kondo`](https://github.com/borkdude/clj-kondo), [`joker`](https://github.com/candid82/joker)
```sh
$ make lint
```
- fixing formatting
```sh
$ make cljstyle-fix
```
### API Documentation ([Codox](https://github.com/weavejester/codox))
```sh
$ lein codox
$ open target/codox/index.html
```