gradido/frontend/run/server.js
MateuszMichalowski cdaca99b04
feat(frontend): migration setup (#3342)
* frontend - moved to vue 2.7 and vite

* frontend - moved to vue 3

* frontend - login page updates

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): fix eslint/stylelint issues

* fix(frontend): fix eslint/stylelint issues

* feature(frontend): update node in docker frontend

* feature(frontend): move send types out of Send file

* feature(frontend): add entry in package json to fix eslint issue

* feature(frontend): eslint fix

* replace docker-compose with docker compose

* update docker-compose test file

* feature(frontend): Creation fixes

* feature(frontend): Add missing updates for apollo scripts.

---------

Co-authored-by: einhornimmond <silas@einhornimmond.de>
2024-08-08 23:02:15 +02:00

22 lines
533 B
JavaScript

// Imports
const express = require('express')
const path = require('path')
// Host & Port
const hostname = '127.0.0.1'
const port = import.meta.env.PORT || 3000
// Express Server
const app = express()
// Serve files
app.use(express.static(path.join(__dirname, '../build')))
// Default to index.html
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../build/index.html'))
})
app.listen(port, hostname, () => {
// eslint-disable-next-line no-console
console.log('Listening at http://%s:%s/', hostname, port)
})