
Security News
/Company News
Securing the Financial Frontier: How Capital One Uses Socket for Open Source Security
Capital One is partnering with Socket to proactively secure its open source supply chain.
@galaxy-stack/orbit-config
Advanced tools
Part of the Orbit framework — a NestJS-style backend framework for Bun.
bun add @galaxy-stack/orbit-config
Module quản lý cấu hình cho Orbit với hỗ trợ environment variables và Zod validation.
import { ConfigService } from '@galaxy-stack/orbit-config';
class MyService {
constructor(private config: ConfigService) {}
getDatabaseUrl() {
return this.config.get<string>('DATABASE_URL');
}
getPort() {
return this.config.get<number>('PORT', 3000); // Với default value
}
}
import { z } from 'zod';
import { ConfigModule } from '@galaxy-stack/orbit-config';
const configSchema = z.object({
PORT: z.coerce.number().default(3000),
DATABASE_URL: z.string().url(),
JWT_SECRET: z.string().min(32),
NODE_ENV: z.enum(['development', 'production', 'test']),
});
@Module({
imports: [
ConfigModule.forRoot({
schema: configSchema,
envFile: '.env',
}),
],
})
class AppModule {}
import { registerAs } from '@galaxy-stack/orbit-config';
// database.config.ts
export default registerAs('database', () => ({
host: process.env.DB_HOST,
port: parseInt(process.env.DB_PORT || '5432'),
name: process.env.DB_NAME,
}));
// Sử dụng
const dbConfig = this.config.get('database');
console.log(dbConfig.host);
ConfigModule.forRoot({
envFile: '.env',
isGlobal: true,
})
ConfigModule.forRoot({
schema: z.object({
PORT: z.coerce.number(),
API_KEY: z.string(),
}),
envFile: '.env',
})
ConfigModule.forRootAsync({
useFactory: async () => ({
envFile: '.env',
schema: mySchema,
}),
})
.env - Default.env.local - Local overrides.env.development - Development.env.production - Production.env.test - Testinginterface ConfigService {
get<T>(key: string): T | undefined;
get<T>(key: string, defaultValue: T): T;
getOrThrow<T>(key: string): T;
has(key: string): boolean;
}
interface DatabaseConfig {
host: string;
port: number;
name: string;
}
const dbConfig = config.get<DatabaseConfig>('database');
FAQs
Configuration module for Orbit framework
The npm package @galaxy-stack/orbit-config receives a total of 266 weekly downloads. As such, @galaxy-stack/orbit-config popularity was classified as not popular.
We found that @galaxy-stack/orbit-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.