File size: 657 Bytes
1c6a4dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using Genie


Genie.loadapp(pwd())

include("packages.jl")
using PrecompileSignatures

for p in PACKAGES
  @show "Precompiling signatures for $p"
  Core.eval(@__MODULE__, Meta.parse("import $p"))
  Core.eval(@__MODULE__, Meta.parse("@precompile_signatures($p)"))
end

import Genie.Requests.HTTP

@info "Hitting routes"

for r in Genie.Router.routes()
  try
    r.action()
  catch
  end
end

const PORT = 8000

try
  @info "Starting server"
  up(PORT)
catch
end

rts = Genie.Router.routes()

try
  for rt in rts
    @time HTTP.request("GET", "http://localhost:$PORT" * rt.path)
  end
catch
end

try
  @info "Stopping server"
  Genie.Server.down!()
catch
end