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

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