2024-03-27 22:18:58 +01:00
|
|
|
desc "Run server"
|
|
|
|
task :server, [:protocol] do |_, args|
|
|
|
|
require 'rbconfig'
|
2024-04-22 01:08:29 +02:00
|
|
|
cli = [RbConfig.ruby, "-rbundler/setup", "cli/bin/twenty", "up"]
|
2024-03-27 22:18:58 +01:00
|
|
|
h = args.to_h
|
|
|
|
if h[:protocol] == "unix"
|
|
|
|
Process.wait spawn(*cli, "--unix", "/tmp/twenty.freebsd.local")
|
|
|
|
else
|
|
|
|
Process.wait spawn(*cli)
|
|
|
|
end
|
|
|
|
end
|