Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f0ba557a6b
Fetching contributors…

Cannot retrieve contributors at this time

executable file 44 lines (34 sloc) 1.026 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#!/usr/local/bin/nush
;;
;; nukid
;; Nuki daemon script
;;

(load "Nu:nu") ;; essentials
(load "Nu:cocoa") ;; wrapped frameworks
(load "Nu:console")
(load "Nu:template")

(load "Nunja")
(load "NuMarkdown")
(load "SmartyPants")

(load "Nuki")
(load "Nuki:git")
(load "Nuki:extensions")
(load "Nuki:helpers")
(load "Nuki:macros")
(load "Nuki:preload")


(set $ip "0.0.0.0")
(set $port "3900")

(set $root (NSFileManager currentDirectoryPath))
(set $site ($root stringByAppendingPathComponent: "site"))
(set $repository ($root stringByAppendingPathComponent: "pages"))
(puts "Nuki is running in #{$root}.")
(puts "Site contents are stored at #{$site}.")
(puts "Git repository is located in #{$repository}")


(set $server (Nunja new))
($server bindToAddress: $ip port: $port)
($server setDelegate: ((NunjaDelegate alloc) initWithSite: "./site"))
($nunja setRoot: $site)
(set $session ((GitSession alloc) initInDirectory: "pages"))

(preload)

(puts "Nuki has loaded. Surf to http://#{$ip}:#{$port}.")
($server run)
Something went wrong with that request. Please try again.