You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
402 B
JavaScript

const express = require('express')
const app = express()
const { version } = require('./package.json')
// Heroku dynamically sets a port
const PORT = process.env.PORT || 5000
app.get('/health', (req, res) => {
res.send('ok')
})
app.get('/version', (req, res) => {
res.send(version)
})
app.use(express.static('dist'))
app.listen(PORT, () => {
console.log(`server started on port ${PORT}`)
})