From 1fc1087014a235a4fd153ea239ec3e5509757c17 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 6 Aug 2020 21:54:25 +0100 Subject: Support Google Sign-in client-side TODO: Support Google Sign-in server-side Also: - Add Haskell to project's shell.nix - Add stubbed Main.hs and Spec.hs - Add common .ghci file --- website/sandbox/learnpianochords/shell.nix | 5 +++- website/sandbox/learnpianochords/src/server/.ghci | 2 ++ .../sandbox/learnpianochords/src/server/Main.hs | 6 +++++ .../sandbox/learnpianochords/src/server/Spec.hs | 13 ++++++++++ .../sandbox/learnpianochords/src/server/index.html | 28 ++++++++++++++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 website/sandbox/learnpianochords/src/server/.ghci create mode 100644 website/sandbox/learnpianochords/src/server/Main.hs create mode 100644 website/sandbox/learnpianochords/src/server/Spec.hs create mode 100644 website/sandbox/learnpianochords/src/server/index.html diff --git a/website/sandbox/learnpianochords/shell.nix b/website/sandbox/learnpianochords/shell.nix index 6f1c8ee23b30..bf7a640fd1cf 100644 --- a/website/sandbox/learnpianochords/shell.nix +++ b/website/sandbox/learnpianochords/shell.nix @@ -1,9 +1,12 @@ let - pkgs = import {}; + pkgs = import /home/wpcarro/nixpkgs {}; in pkgs.mkShell { buildInputs = with pkgs; [ elmPackages.elm elmPackages.elm-format elmPackages.elm-live + (haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [ + hspec + ])) ]; } diff --git a/website/sandbox/learnpianochords/src/server/.ghci b/website/sandbox/learnpianochords/src/server/.ghci new file mode 100644 index 000000000000..efc88e630ccb --- /dev/null +++ b/website/sandbox/learnpianochords/src/server/.ghci @@ -0,0 +1,2 @@ +:set prompt "> " +:set -Wall diff --git a/website/sandbox/learnpianochords/src/server/Main.hs b/website/sandbox/learnpianochords/src/server/Main.hs new file mode 100644 index 000000000000..5fca22a4567a --- /dev/null +++ b/website/sandbox/learnpianochords/src/server/Main.hs @@ -0,0 +1,6 @@ +-------------------------------------------------------------------------------- +module Main where +-------------------------------------------------------------------------------- + +main :: IO () +main = putStrLn "Working!" diff --git a/website/sandbox/learnpianochords/src/server/Spec.hs b/website/sandbox/learnpianochords/src/server/Spec.hs new file mode 100644 index 000000000000..dfdd3ddebb05 --- /dev/null +++ b/website/sandbox/learnpianochords/src/server/Spec.hs @@ -0,0 +1,13 @@ +-------------------------------------------------------------------------------- +module Spec where +-------------------------------------------------------------------------------- +import Test.Hspec +import Test.QuickCheck +import Control.Exception (evaluate) +-------------------------------------------------------------------------------- + +main :: IO () +main = hspec $ do + describe "Testing" $ do + it "is setup" $ do + True == True diff --git a/website/sandbox/learnpianochords/src/server/index.html b/website/sandbox/learnpianochords/src/server/index.html new file mode 100644 index 000000000000..ce80faf0d501 --- /dev/null +++ b/website/sandbox/learnpianochords/src/server/index.html @@ -0,0 +1,28 @@ + + + + + Google Sign-in + + + + +
+ Sign out + + + -- cgit 1.4.1