oneuptime/accounts/index.js
2019-08-28 15:46:14 +05:30

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);