Created
April 30, 2018 10:36
-
-
Save cataska/511431c22a285ce03fd6e864066a4dc3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns server.core) | |
(def http (js/require "http")) | |
(def hostname "127.0.0.1") | |
(def port 3000) | |
(defn handler [req res] | |
(doto res | |
(.writeHead 200 {"Content-Type" "text/plain"}) | |
(.end "Hello World\n"))) | |
(doto (.createServer http handler) | |
(.listen port hostname | |
(fn [] (.log js/console (str "Server Running at http://" hostname ":" port "/"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment