From 228626b65d55aa9ef86c11eeadd7d5c936ceeaa6 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 19 Sep 2024 14:37:27 -0500 Subject: [PATCH] Making the tfc-api in lisp use ningle rather than raw hunchentoot --- flake.nix | 15 +++- layouts/shortcodes/health-form.html | 4 +- src/main.lisp | 109 +++++++++++++--------------- 3 files changed, 66 insertions(+), 62 deletions(-) diff --git a/flake.nix b/flake.nix index 3fde1fa..342f1bb 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,9 @@ cl_plus_ssl fiveam slite + clack + woo + ningle pkgs.openssl pkgs.openssl.out pkgs.openssl.dev @@ -68,7 +71,17 @@ in { - devShell = import ./shell.nix { inherit pkgs; }; + devShell = pkgs.mkShell { + name = "tfc-api"; + version = "0.0.1"; + src = src; + nativeBuildInputs = nbi; + buildInputs = bi; + nativeLibs = nativeLibs; + shellHook = '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath nativeLibs}" + ''; + }; packages.default = pkgs.rustPlatform.buildRustPackage { pname = "api"; version = "0.0.1"; diff --git a/layouts/shortcodes/health-form.html b/layouts/shortcodes/health-form.html index ce4fa23..ae4e8dc 100644 --- a/layouts/shortcodes/health-form.html +++ b/layouts/shortcodes/health-form.html @@ -78,7 +78,7 @@ // Can now start using this in production IF, // I get the server running on the server /* let base = "https://api.tfcconnection.org/health-form"; */ - let base = "http://localhost:4242/health-form"; + let base = "http://localhost:5000/health-form"; fetch(base, { method: "POST", body: data @@ -217,7 +217,7 @@