working on healthcheck api and auth api (#2)

Reviewed-on: #2
Co-authored-by: Joseph Nelson <joseph.nelson4456@gmail.com>
Co-committed-by: Joseph Nelson <joseph.nelson4456@gmail.com>
This commit was merged in pull request #2.
This commit is contained in:
2026-05-15 22:37:27 -07:00
committed by joseph.nelson4456
parent ce914f91fd
commit 2636816241
16 changed files with 151 additions and 36 deletions
+28
View File
@@ -0,0 +1,28 @@
import express from 'express'
import path from 'path'
import cors from 'cors'
import healthCheckRoutes from './routes/healthcheck'
import authRoutes from './routes/auth'
const app = express()
const port = process.env.PORT || 3000
// Middleware
app.use(express.json()) // For parsing application/json
app.use(express.urlencoded({ extended: true })) // For parsing URL-encoded form data
app.use(cors())
// Mount Routes
app.use('/healthcheck', healthCheckRoutes)
app.use('/auth', authRoutes)
// Default Route (Catch-all for undefined routes)
app.use((req, res, next) => {
res.status(404).send('Sorry, the resource you requested could not be found.')
})
app.listen(port, () => {
console.log(`Server listening on port ${port}`)
})
export default app