Change server listening port to 80 for production deployment

This commit is contained in:
Johannes Baumeister 2026-04-20 15:24:18 +02:00
parent 1b67432b71
commit b2ed6bee38
1 changed files with 8 additions and 7 deletions

View File

@ -158,7 +158,7 @@ app.get('/api/poi', async (req, res) => {
SELECT
id,
ST_AsGeoJSON(ST_Transform(geom, 4326)) as geometry
FROM "netzverknüpfungspunkt"
FROM netzverknüpfungspunkt
`;
const result = await client.query(query);
const geojson = {
@ -320,6 +320,7 @@ app.patch('/api/owners/:id', async (req, res) => {
}
});
app.listen(3000, () => {
console.log(`Server running at http://localhost:3000`);
const PORT = process.env.PORT || 80;
app.listen(PORT, '0.0.0.0', () => {
console.log(`Server running on port ${PORT}`);
});