Change local backend port to 3007
This commit is contained in:
@@ -10,7 +10,7 @@ export class AppConfigService {
|
||||
}
|
||||
|
||||
get port(): number {
|
||||
return Number(this.required('PORT'));
|
||||
return Number(this.configService.get<string>('PORT') ?? '3007');
|
||||
}
|
||||
|
||||
get databaseUrl(): string {
|
||||
|
||||
@@ -4,15 +4,15 @@ describe('validateEnvironment', () => {
|
||||
it('accepts a valid environment', () => {
|
||||
const result = validateEnvironment({
|
||||
NODE_ENV: 'test',
|
||||
PORT: '3000',
|
||||
PORT: '3007',
|
||||
DATABASE_URL: 'postgresql://velody:velody@localhost:5432/velody?schema=public',
|
||||
STORAGE_ROOT: '/tmp/velody',
|
||||
PUBLIC_BASE_URL: 'http://localhost:3000',
|
||||
PUBLIC_BASE_URL: 'http://localhost:3007',
|
||||
DEVICE_BOOTSTRAP_SECRET: 'secret',
|
||||
MAX_UPLOAD_SIZE_BYTES: '1024',
|
||||
});
|
||||
|
||||
expect(result.PORT).toBe(3000);
|
||||
expect(result.PORT).toBe(3007);
|
||||
expect(result.MAX_UPLOAD_SIZE_BYTES).toBe(1024);
|
||||
});
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class EnvironmentVariables {
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(65535)
|
||||
PORT!: number;
|
||||
PORT: number = 3007;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
|
||||
Reference in New Issue
Block a user