diff options
Diffstat (limited to 'server/index.ts')
| -rw-r--r-- | server/index.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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) => { |
