puts "Hello BrisRuby!"
require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello BrisRuby!"
end
puts "Listening on http://127.0.0.1:8080"
server.listen
require "kemal"
get "/" do
"Hello BrisRuby!"
end
Kemal.run
require "sinatra"
get "/" do
"Hello BrisRuby!"
end
395μs
if rand(2) > 0
my_string = "hello world"
end
puts my_string.upcase
$ crystal hello_world.cr
Error in hello_world.cr:5: undefined method 'upcase'
for Nil (compile-time type is (String | Nil))
puts my_string.upcase
^~~~~~
name: my-project
version: 0.1
license: MIT
crystal: 0.21.0
dependencies:
mysql:
github: crystal-lang/crystal-mysql
version: ~> 0.3.1
No Windows support (yet)
Still pre v1
crystal-lang.org
simple.industries
acaprojects.com