File tree Expand file tree Collapse file tree 4 files changed +17
-12
lines changed Expand file tree Collapse file tree 4 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ PORT="3001"
4
4
HOST="localhost" # Hostname for the server
5
5
6
6
# CORS Settings
7
- CORS_ORIGIN="http://localhost: *" # Allowed CORS origin, adjust as necessary
7
+ CORS_ORIGIN="*" # Allowed CORS origin, adjust as necessary
8
8
9
9
# Rate Limiting
10
10
COMMON_RATE_LIMIT_WINDOW_MS="1000" # Window size for rate limiting (ms)
Original file line number Diff line number Diff line change 1
1
# Instalation
2
- Copy ` .env.template ` to ` .env ` and set configuration
3
2
3
+ Install npm packages
4
4
```
5
5
npm i
6
6
```
7
7
8
+ Copy ` .env.template ` to ` .env ` and set configuration. Alternatively use:
9
+ ```
10
+ npm run doppler:syncdev # local development
11
+ npm run doppler:syncstg # staging
12
+ npm run doppler:syncprd # production
13
+ ```
14
+
8
15
# Running
9
16
10
17
Dev server
Original file line number Diff line number Diff line change 16
16
"lint:fix" : " biome check src/ --fix" ,
17
17
"format" : " biome format src/" ,
18
18
"test" : " vitest run" ,
19
- "prepare" : " husky"
19
+ "prepare" : " husky" ,
20
+ "doppler:login" : " ./scripts/dopplerLogin.sh" ,
21
+ "doppler:syncdev" : " TOKEN=dev ./scripts/dopplerSync.sh" ,
22
+ "doppler:syncstg" : " TOKEN=stg ./scripts/dopplerSync.sh" ,
23
+ "doppler:syncprd" : " TOKEN=prd ./scripts/dopplerSync.sh"
20
24
},
21
25
"dependencies" : {
22
26
"@asteasolutions/zod-to-openapi" : " 7.2.0" ,
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- TOKENS=( " local " )
2
+ : " ${TOKEN := dev} " # default dev
3
3
PROJECT_NAME=" euler-swap-api"
4
4
5
-
6
- for TOKEN in ${TOKENS[@]} ; do
7
- # Download secrets and store them in a temporary file
8
- doppler setup -p $PROJECT_NAME --config $TOKEN && doppler secrets download --no-file --format env > .env.${TOKEN}
9
- done
10
-
11
- # .env.${ENV/-/.} => ${string/substring/replacement} | replaces the - with a dot.
12
- # In doppler UI those can't use dots in the env naming but locally we want them
5
+ # Download secrets and store them in a temporary file
6
+ doppler setup -p $PROJECT_NAME --config $TOKEN && doppler secrets download --no-file --format env > .env
You can’t perform that action at this time.
0 commit comments