mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
22 lines
524 B
JavaScript
Executable File
22 lines
524 B
JavaScript
Executable File
const express = require('express');
|
|
const path = require('path');
|
|
const app = express();
|
|
|
|
app.use(express.static(path.join(__dirname, 'build')));
|
|
|
|
var env = {
|
|
TEST: 'TEST',
|
|
FYIPE_HOSTED: process.env.FYIPE_HOSTED,
|
|
HOST: process.env.HOST,
|
|
ACCOUNTS_HOST: process.env.ACCOUNTS_HOST,
|
|
BACKEND_HOST: process.env.BACKEND_HOST
|
|
}
|
|
|
|
app.get('/env', function (req, res) {
|
|
res.send(JSON.stringify(env));
|
|
})
|
|
app.get('/*', function (req, res) {
|
|
res.sendFile(path.join(__dirname, 'build', 'index.html'));
|
|
});
|
|
|
|
app.listen(3003); |