Change port by env
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
import express from 'express';
|
||||
import { getLocationOfTarget } from './app.service';
|
||||
|
||||
const port = Number(process.env.PORT) || 3000;
|
||||
|
||||
const app = express();
|
||||
|
||||
app.get('/*', async (req, res) => {
|
||||
@ -15,6 +17,6 @@ app.get('/*', async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log('Now listening on port 3000!');
|
||||
app.listen(port, () => {
|
||||
console.log(`Now listening on port ${port}!`);
|
||||
});
|
||||
|
Reference in New Issue
Block a user