Add the simple endpoint and the configuration.
This commit is contained in:
+5
-1
@@ -8,4 +8,8 @@
|
|||||||
[]
|
[]
|
||||||
|
|
||||||
:builds
|
:builds
|
||||||
{}}
|
{:node {:target :node-script
|
||||||
|
:output-to "public/index.js"
|
||||||
|
:main blog.core/main
|
||||||
|
:init-fn blog.core/main}}}
|
||||||
|
|
||||||
|
|||||||
@@ -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))))
|
||||||
|
|
||||||
Reference in New Issue
Block a user