import express from 'express' // import serveStatic from 'serve-static' import bodyParser from 'body-parser' import { loggingMiddleware, PingRouter, StatusRouter } from './server/helpers.js' const app = express() app.use(bodyParser.json()) app.use(loggingMiddleware) app.use('/api/status', new StatusRouter()) app.use('/api/ping', new PingRouter()) app.all('*', (req, res) => { res.status(404) res.end('Not found') }) app.listen(4000, () => { console.log(`Started server on port 4000...`) })