mirror of
https://github.com/shiroikitsu8/Bayshore_6r_legacy.git
synced 2024-11-28 01:11:00 +01:00
Add support for changing the port
This commit is contained in:
parent
804fcee27a
commit
6c45b72512
5
.env.example
Normal file
5
.env.example
Normal file
@ -0,0 +1,5 @@
|
||||
POSTGRES_URL=postgresql://user:password@your-host:5432/database
|
||||
ALLNET_PORT=20080
|
||||
MUCHA_PORT=10082
|
||||
SERVICE_PORT=9002
|
||||
API_PORT=9003
|
10
src/index.ts
10
src/index.ts
@ -27,10 +27,12 @@ export const prisma = new PrismaClient();
|
||||
|
||||
const appRouter = Router();
|
||||
|
||||
const PORT_ALLNET = 80;
|
||||
const PORT_MUCHA = 10082;
|
||||
const PORT_BNGI = 9002;
|
||||
const PORT_API = 9003;
|
||||
console.log(process.env);
|
||||
|
||||
const PORT_ALLNET = process.env.ALLNET_PORT !== undefined ? parseInt(process.env.ALLNET_PORT) : 80;
|
||||
const PORT_MUCHA = process.env.MUCHA_PORT !== undefined ? parseInt(process.env.MUCHA_PORT) : 10082;
|
||||
const PORT_BNGI = process.env.SERVICE_PORT !== undefined ? parseInt(process.env.SERVICE_PORT) : 9002;
|
||||
const PORT_API = process.env.API_PORT !== undefined ? parseInt(process.env.API_PORT) : 9003;
|
||||
|
||||
const app = express();
|
||||
const muchaApp = express();
|
||||
|
Loading…
Reference in New Issue
Block a user