Make base API path configurable via env variable

pull/1/head
Nick 'MorpheusXAUT' Müller 2 years ago
parent 131acbf75c
commit 759e4c3711
No known key found for this signature in database

@ -4,14 +4,14 @@ import morgan from 'morgan';
import router from './router';
import wxService from './services/wx.service';
const { PORT = 3000 } = process.env;
const { PORT = 3000, BASE_PATH = '/api' } = process.env;
const app = express();
app.set('trust proxy', true);
app.use(morgan('combined'));
app.use('/api', router.router);
app.use(BASE_PATH, router.router);
const frontendRoot = '/opt/frontend/dist';
app.use(express.static(frontendRoot));

Loading…
Cancel
Save