Update server.rake

This commit is contained in:
0x1eef 2024-06-22 14:12:50 -03:00
parent 351d2ffbfb
commit 1d05a25b29

View file

@ -1,13 +1,11 @@
# frozen_string_literal: true # frozen_string_literal: true
cwd = File.realpath File.join(__dir__, "..", "..", ".")
desc "Start web server" desc "Start web server"
task :server, [:protocol] do |_t, args| task :server, [:protocol] do |_t, args|
require "server" require "server"
nanoc = Ryo.from_yaml(path: File.join(cwd, "nanoc.yaml"))
h = args.to_h h = args.to_h
p = h[:protocol] || "tcp" p = h[:protocol] || "tcp"
n = File.basename(cwd) n = File.basename(dirs.root)
o = if p == "unix" o = if p == "unix"
{unix: nanoc.server.unix.path} {unix: nanoc.server.unix.path}
else else