0x1eef
2bf57351ea
Not all website features are working, but this commit is mostly focused on an architecture that can be used in future projects
19 lines
505 B
Ruby
19 lines
505 B
Ruby
# frozen_string_literal: true
|
|
|
|
cwd = File.realpath File.join(__dir__, "..", "..", "..", "client")
|
|
desc "Start web server"
|
|
task :server, [:protocol] do |_t, args|
|
|
h = args.to_h
|
|
p = h[:protocol] || "tcp"
|
|
n = File.basename File.dirname(cwd)
|
|
Process.setproctitle "rake server[#{p}] [#{n}]"
|
|
if p == "unix"
|
|
Twenty::Command::Up
|
|
.new(["-u", "/tmp/www/twenty.al-ridwan.home.network"])
|
|
.run
|
|
else
|
|
Twenty::Command::Up
|
|
.new(["-b", "127.0.0.1", "-p", "2222"])
|
|
.run
|
|
end
|
|
end
|