File tree 2 files changed +10
-7
lines changed
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,17 @@ To run just the frontend, first install dependencies with
23
23
``` bash
24
24
npm i
25
25
```
26
- In ` next.config.js ` , set ` env.API_URL ` to the public API URL of the rCTF instance, and ` KLODD_URL ` to the public URL of
26
+ In ` next.config.js ` , set ` RCTF_BASE ` to the public URL of the backend rCTF instance, and ` KLODD_URL ` to the public URL of
27
27
the Klodd instancer frontend:
28
28
``` js
29
+ const RCTF_BASE = ' http://ctf.b01lers.com:9000' ;
30
+
29
31
const nextConfig = {
30
32
env: {
31
- API_BASE : ' http://ctf.b01lers.com:9000/ api/v1' ,
33
+ API_BASE : ` ${ RCTF_BASE } / api/v1` ,
32
34
KLODD_URL : ' https://klodd.localhost.direct'
33
- }
35
+ },
36
+ // ...
34
37
}
35
38
```
36
39
Then, run
@@ -49,7 +52,7 @@ RCTF_GIT_REF=master
49
52
50
53
You can then start both the rCTF backend and production frontend instance simultaneously with
51
54
``` bash
52
- docker- compose up -d --build
55
+ docker compose up -d --build
53
56
```
54
57
55
58
### Configuring
Original file line number Diff line number Diff line change 1
1
export function pluralize ( num : number ) {
2
- if ( num % 10 === 1 ) return `${ num } st` ;
3
- if ( num % 10 === 2 ) return `${ num } nd` ;
4
- if ( num % 10 === 3 ) return `${ num } rd` ;
2
+ if ( num % 10 === 1 && num !== 11 ) return `${ num } st` ; // 21st, but not 11th
3
+ if ( num % 10 === 2 && num !== 12 ) return `${ num } nd` ; // 32nd, but not 12th
4
+ if ( num % 10 === 3 && num !== 13 ) return `${ num } rd` ; // 63rd, but not 13th
5
5
return `${ num } th`
6
6
}
You can’t perform that action at this time.
0 commit comments