mirror of
https://github.com/TheRealOwenRees/chess-scribe-api.git
synced 2026-07-23 01:06:56 +00:00
boilerplate for formatting and basic routes
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
profile = default
|
||||
version = 0.28.1
|
||||
@@ -1,4 +1,4 @@
|
||||
(executable
|
||||
(public_name chess-scribe-api)
|
||||
(name main)
|
||||
(libraries chess_scribe_api))
|
||||
(libraries chess_scribe_api dream))
|
||||
|
||||
+8
-1
@@ -1 +1,8 @@
|
||||
let () = print_endline "Hello, World!"
|
||||
let () =
|
||||
Dream.run @@ Dream.logger
|
||||
@@ Dream.router
|
||||
[
|
||||
Dream.get "/" (fun _ -> Dream.html "API Docs");
|
||||
Dream.get "/health" (fun _ -> Dream.html "Health Check");
|
||||
Dream.get "/pdf" (fun _ -> Dream.html "Generate PDF");
|
||||
]
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
synopsis: "API for chess-scribe.org"
|
||||
description:
|
||||
"The backend that powers chess-scribe.org. Convert chess PGN files into PDFs."
|
||||
maintainer: ["Owen Rees <owenrees.dev@gmail.com>"]
|
||||
authors: ["Owen Rees<owenrees.dev@gmail.com>"]
|
||||
license: "AGPLv3"
|
||||
tags: ["chess" "pgn" "pdf"]
|
||||
homepage: "https://github.com/therealowenrees/chess-scribe-api"
|
||||
doc: "https://url/to/documentation"
|
||||
bug-reports: "https://github.com/therealowenrees/chess-scribe-api/issues"
|
||||
depends: [
|
||||
"dune" {>= "3.21"}
|
||||
"ocaml"
|
||||
"dream" {>= "1.0.0~alpha8"}
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
["dune" "subst"] {dev}
|
||||
[
|
||||
"dune"
|
||||
"build"
|
||||
"-p"
|
||||
name
|
||||
"-j"
|
||||
jobs
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
]
|
||||
dev-repo: "git+https://github.com/therealowenrees/chess-scribe-api.git"
|
||||
x-maintenance-intent: ["(latest)"]
|
||||
|
||||
+7
-3
@@ -17,9 +17,13 @@
|
||||
|
||||
(package
|
||||
(name chess-scribe-api)
|
||||
(synopsis "A short synopsis")
|
||||
(description "A longer description")
|
||||
(depends ocaml)
|
||||
(synopsis "API for chess-scribe.org")
|
||||
(description
|
||||
"The backend that powers chess-scribe.org. Convert chess PGN files into PDFs.")
|
||||
(depends
|
||||
ocaml
|
||||
(dream
|
||||
(>= "1.0.0~alpha8")))
|
||||
(tags
|
||||
("chess" "pgn" "pdf")))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user