dolphins7.skeleton/host/rake/tasks/server.rake

12 lines
305 B
Ruby
Raw Normal View History

2024-03-27 22:18:58 +01:00
desc "Run server"
task :server, [:protocol] do |_, args|
require 'rbconfig'
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