File tree 3 files changed +12
-14
lines changed
3 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 9
9
// - DO NOT add any wierd references here
10
10
11
11
const Application = {
12
- name : "detris" ,
13
- version : "1.0.0-alpha.0" ,
14
- repository : "https://github.com/hexagon/detris" ,
15
- }
12
+ name : "detris" ,
13
+ version : "1.0.0-alpha.0" ,
14
+ repository : "https://github.com/hexagon/detris" ,
15
+ } ;
16
16
17
- export { Application }
17
+ export { Application } ;
Original file line number Diff line number Diff line change @@ -18,15 +18,13 @@ xhr.open("GET", "api/meta");
18
18
xhr . onload = function ( ) {
19
19
if ( xhr . status === 200 ) {
20
20
const res = JSON . parse ( xhr . responseText ) ;
21
- console . log ( res )
21
+ console . log ( res ) ;
22
22
if ( res . version ) {
23
- const
24
- elmVersion = document . getElementById ( "version" ) ;
23
+ const elmVersion = document . getElementById ( "version" ) ;
25
24
if ( elmVersion ) elmVersion . innerHTML = res . version ;
26
25
}
27
26
if ( res . instance ) {
28
- const
29
- elmInstance = document . getElementById ( "instance" ) ;
27
+ const elmInstance = document . getElementById ( "instance" ) ;
30
28
if ( elmInstance ) elmInstance . innerHTML = res . instance ;
31
29
}
32
30
}
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ const routes = [
8
8
pattern : new URLPattern ( { pathname : "/api/meta" } ) ,
9
9
handler : function (
10
10
_req : Request ,
11
- _match : Record < string , string >
11
+ _match : Record < string , string > ,
12
12
) : Response | undefined {
13
- const meta = {
13
+ const meta = {
14
14
...Application ,
15
- instance : Deno . env . get ( "PUP_CLUSTER_INDEX " ) || "0"
16
- }
15
+ instance : Deno . env . get ( "PUP_CLUSTER_INSTANCE " ) || "0" ,
16
+ } ;
17
17
return new Response ( JSON . stringify ( meta ) , {
18
18
status : 200 ,
19
19
headers : {
You can’t perform that action at this time.
0 commit comments