diff options
| -rw-r--r-- | .env.template | 4 | ||||
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | server/index.ts | 2 | ||||
| -rw-r--r-- | src/helpers/fetchSolution.ts | 6 |
4 files changed, 8 insertions, 6 deletions
diff --git a/.env.template b/.env.template index 1329a29..d4dc824 100644 --- a/.env.template +++ b/.env.template @@ -1,3 +1,3 @@ SERVER_PORT=3001 -HEARDLE_SALT="changeme" -API_URL="http://localhost:3001" +REACT_APP_HEARDLE_SALT="changeme" +REACT_APP_API_URL="http://localhost:3001" @@ -35,3 +35,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* TODO +dist +.env
\ No newline at end of file diff --git a/server/index.ts b/server/index.ts index 7b4f1d5..677c736 100644 --- a/server/index.ts +++ b/server/index.ts @@ -11,7 +11,7 @@ app.use(cors()); app.use(express.json()); const SERVER_PORT = process.env.SERVER_PORT || 3001; -const SALT = process.env.HEARDLE_SALT ?? 'changeme'; +const SALT = process.env.REACT_APP_HEARDLE_SALT ?? 'changeme'; function getDailyKey(): Buffer { const date = new Date().toISOString().split('T')[0]; diff --git a/src/helpers/fetchSolution.ts b/src/helpers/fetchSolution.ts index 2726049..d271dd0 100644 --- a/src/helpers/fetchSolution.ts +++ b/src/helpers/fetchSolution.ts @@ -1,14 +1,14 @@ import { Song } from "../types/song"; -const SALT = process.env.NEXT_HEARDLE_SALT ?? 'changeme'; -const API_URL = process.env.NEXT_HEARDLE_API_URL ?? 'http://localhost:3001'; +const SALT = process.env.REACT_APP_HEARDLE_SALT ?? 'changeme'; +const API_URL = process.env.REACT_APP_HEARDLE_API_URL ?? 'http://23:432e3001'; function hexToBytes(hex: string): Uint8Array { const bytes = new Uint8Array(hex.length / 2); for (let i = 0; i < hex.length; i += 2) { bytes[i / 2] = parseInt(hex.slice(i, i + 2), 16); } - return bytes; +return bytes; } |
