From 902116bdfcb240311a6cbef22867ea773eaeba4d Mon Sep 17 00:00:00 2001 From: Vlad Faust Date: Thu, 16 Aug 2018 21:18:51 +0300 Subject: [PATCH] feat: update to work with Crystal 0.26 --- Dockerfile | 2 +- shard.lock | 6 +++--- shard.yml | 10 +++++----- src/bin/server.cr | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e1a685..7d9da1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:0.25.0 +FROM crystallang/crystal:0.26.0 # Add the app and build it WORKDIR /app/ diff --git a/shard.lock b/shard.lock index e875587..6733586 100644 --- a/shard.lock +++ b/shard.lock @@ -6,7 +6,7 @@ shards: core: github: vladfaust/core - version: 0.4.0 + version: 0.4.1 db: github: crystal-lang/crystal-db @@ -22,7 +22,7 @@ shards: migrate: github: vladfaust/migrate.cr - version: 0.2.0 + version: 0.3.0 pg: github: will/crystal-pg @@ -30,7 +30,7 @@ shards: prism: github: vladfaust/prism - version: 0.2.1 + version: 0.3.0 radix: github: luislavena/radix diff --git a/shard.yml b/shard.yml index 583be35..d6dc8be 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: crystalworld -version: 0.1.0 +version: 0.2.0 authors: - Vlad Faust @@ -10,7 +10,7 @@ targets: cake: main: src/bin/cake.cr -crystal: 0.25.0 +crystal: 0.26.0 license: MIT @@ -25,13 +25,13 @@ dependencies: version: ~> 0.15.0 migrate: github: vladfaust/migrate.cr - version: ~> 0.2.0 + version: ~> 0.3.0 core: github: vladfaust/core - version: ~> 0.4.0 + version: ~> 0.4.1 prism: github: vladfaust/prism - version: ~> 0.2.0 + version: ~> 0.3.0 jwt: github: crystal-community/jwt version: ~> 0.3.0 diff --git a/src/bin/server.cr b/src/bin/server.cr index 981dda3..4868a2b 100644 --- a/src/bin/server.cr +++ b/src/bin/server.cr @@ -22,8 +22,8 @@ handlers = [log_handler, cors, auth_handler, router] # Let's just put them all i host = ENV["HOST"]? || "0.0.0.0" # Get HOST environment variable or use "0.0.0.0" by default port = ENV["PORT"]?.try &.to_i || 5000 # ditto -# *true* argument enables multi-process usage of a same port -server = Prism::Server.new(handlers, host, port, true, logger) +server = Prism::Server.new(handlers, logger) +server.bind_tcp(host, port, reuse_port: true) # `reuse_port` enables multi-process usage of the same port logger.info("Welcome to the Crystal World! ✨ https://github.com/vladfaust/crystalworld") server.listen