diff options
Diffstat (limited to 'server')
| -rw-r--r-- | server/data/startDate.ts | 1 | ||||
| -rw-r--r-- | server/index.ts | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/server/data/startDate.ts b/server/data/startDate.ts new file mode 100644 index 0000000..bb49bfe --- /dev/null +++ b/server/data/startDate.ts @@ -0,0 +1 @@ +export const startDate = new Date('6/3/2026'); diff --git a/server/index.ts b/server/index.ts index 4e9d1b5..d347e8f 100644 --- a/server/index.ts +++ b/server/index.ts @@ -2,7 +2,7 @@ import express from 'express'; import path from 'path'; import crypto from 'crypto'; import { songs } from './data/songs'; -import { startDate } from '../src/constants/startDate'; +import { startDate } from './data/startDate'; import cors from 'cors'; @@ -41,6 +41,10 @@ app.get('/songs', (_req, res) => { res.json(songs.map(({ artist, name }) => ({ artist, name }))); }); +app.get('/info', (_req, res) => { + res.json({ startDate: startDate.toISOString() }); +}); + if (process.env.NODE_ENV === 'production') { app.use(express.static(path.join(__dirname, '../build'))); app.get('*', (_req, res) => { |
