mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-10 05:26:44 +03:00
🎉 Gitea Mirror: Added
This commit is contained in:
28
src/lib/config.ts
Normal file
28
src/lib/config.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Application configuration
|
||||
*/
|
||||
|
||||
// Environment variables
|
||||
export const ENV = {
|
||||
// Node environment (development, production, test)
|
||||
NODE_ENV: process.env.NODE_ENV || "development",
|
||||
|
||||
// Database URL - use SQLite by default
|
||||
get DATABASE_URL() {
|
||||
// If explicitly set, use the provided DATABASE_URL
|
||||
if (process.env.DATABASE_URL) {
|
||||
return process.env.DATABASE_URL;
|
||||
}
|
||||
|
||||
// Otherwise, use the default database
|
||||
return "sqlite://data/gitea-mirror.db";
|
||||
},
|
||||
|
||||
// JWT secret for authentication
|
||||
JWT_SECRET:
|
||||
process.env.JWT_SECRET || "your-secret-key-change-this-in-production",
|
||||
|
||||
// Server host and port
|
||||
HOST: process.env.HOST || "localhost",
|
||||
PORT: parseInt(process.env.PORT || "3000", 10),
|
||||
};
|
||||
Reference in New Issue
Block a user