Add the simple endpoint and the configuration.

This commit is contained in:
2024-03-26 21:07:26 +02:00
parent 614bed7899
commit bd8d737758
2 changed files with 20 additions and 1 deletions
+5 -1
View File
@@ -8,4 +8,8 @@
[]
:builds
{}}
{:node {:target :node-script
:output-to "public/index.js"
:main blog.core/main
:init-fn blog.core/main}}}
+15
View File
@@ -0,0 +1,15 @@
(ns blog.core
(:require ["express" :as express]))
(def app (express))
(def port 3000)
(defn main []
(. app get "/"
(fn [req res]
(. res send "Hello world")))
(. app listen port
(fn []
(println "Listen on " port))))