Skip to content

Commit

Permalink
Show version
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfelixrico committed Apr 4, 2024
1 parent a8f2884 commit 0861c93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Server } from 'socket.io'
import { socketIOHandler } from './socket-controllers/socket.controller'
import roomService from './services/room.service'
import nocache from 'nocache'
import manifest from '../package.json'

const app = express()
const server = createServer(app)
Expand All @@ -18,7 +19,9 @@ const io = new Server(server)
app.use(nocache())

app.get('/', (_, res) => {
res.send('Hello World')
res.json({
version: process.env.BUILD_VERSION ?? manifest.version,
})
})

app.post('/room', (_, res) => {
Expand Down

0 comments on commit 0861c93

Please sign in to comment.