mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 07:07:21 +00:00
fix port
This commit is contained in:
@ -13,4 +13,4 @@ RUN npm run build
|
|||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
|
|
||||||
CMD ["sh", "-c", "npm run start:dev"]
|
CMD ["npm", "run", "start"]
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -35,7 +35,7 @@
|
|||||||
"typeorm": "^0.3.20"
|
"typeorm": "^0.3.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nestjs/cli": "^10.0.0",
|
"@nestjs/cli": "^10.3.2",
|
||||||
"@nestjs/schematics": "^10.0.0",
|
"@nestjs/schematics": "^10.0.0",
|
||||||
"@nestjs/testing": "^10.0.0",
|
"@nestjs/testing": "^10.0.0",
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
"typeorm": "^0.3.20"
|
"typeorm": "^0.3.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nestjs/cli": "^10.0.0",
|
"@nestjs/cli": "^10.3.2",
|
||||||
"@nestjs/schematics": "^10.0.0",
|
"@nestjs/schematics": "^10.0.0",
|
||||||
"@nestjs/testing": "^10.0.0",
|
"@nestjs/testing": "^10.0.0",
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
|
@ -8,12 +8,6 @@ import { ValidationPipe } from '@nestjs/common';
|
|||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AuthModule);
|
const app = await NestFactory.create(AuthModule);
|
||||||
|
|
||||||
// Enable 'trust proxy' setting
|
|
||||||
app.use((req, res, next) => {
|
|
||||||
app.getHttpAdapter().getInstance().set('trust proxy', 1);
|
|
||||||
next();
|
|
||||||
});
|
|
||||||
|
|
||||||
app.enableCors();
|
app.enableCors();
|
||||||
|
|
||||||
app.use(
|
app.use(
|
||||||
@ -33,7 +27,7 @@ async function bootstrap() {
|
|||||||
|
|
||||||
app.useGlobalPipes(new ValidationPipe());
|
app.useGlobalPipes(new ValidationPipe());
|
||||||
|
|
||||||
await app.listen(4000);
|
await app.listen(process.env.PORT || 4000);
|
||||||
}
|
}
|
||||||
console.log('Starting auth at port 4001...');
|
console.log('Starting auth at port 4001...');
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
Reference in New Issue
Block a user