dolphins7.skeleton/host/rake/tasks/server.rake
0x1eef 2bf57351ea Re-implement the client
Not all website features are working, but this commit is mostly
focused on an architecture that can be used in future projects
2024-07-31 22:48:00 -03:00

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