refactor: change default port to 4000 to avoid clashes on server
This commit is contained in:
parent
88c3add4ad
commit
05bf74aca5
1 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ import cors from "cors"
|
||||||
import { validateApiKey } from "./middlewear/auth.js"
|
import { validateApiKey } from "./middlewear/auth.js"
|
||||||
const app = express()
|
const app = express()
|
||||||
|
|
||||||
const port = process.env.PORT || 3000
|
const port = process.env.PORT || 4000
|
||||||
|
|
||||||
app.use(cors())
|
app.use(cors())
|
||||||
app.use(express.json())
|
app.use(express.json())
|
||||||
|
|
@ -14,10 +14,10 @@ app.use("/entries", entries)
|
||||||
app.use("/tags", tags)
|
app.use("/tags", tags)
|
||||||
|
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.info(`TB-INFO eolas-api running on NodeJS ${process.version}`)
|
console.info(`TB-INFO eolas-api running on NodeJS ${process.version}`)
|
||||||
console.info(`TB-INFO eolas-api server running at http://localhost:${port}`)
|
console.info(`TB-INFO eolas-api server running at http://localhost:${port}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get("/health", (req, res) => {
|
app.get("/health", (req, res) => {
|
||||||
res.status(200).json({ status: ok })
|
res.status(200).json({ status: ok })
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue