env config
This commit is contained in:
parent
f7d4ae4741
commit
27280c831a
30
.env
30
.env
@ -1,15 +1,23 @@
|
||||
MONGODB_URI=mongodb://localhost:27017/campfire
|
||||
# Настройки Next.js
|
||||
NEXT_PUBLIC_URL=http://localhost:3000
|
||||
NEXT_PUBLIC_API_URL=http://localhost:3001/api
|
||||
|
||||
# Настройки сервера
|
||||
PORT=3001
|
||||
NODE_ENV=development
|
||||
|
||||
# База данных
|
||||
MONGODB_URI=mongodb://localhost:27017/campfire-id
|
||||
|
||||
# Безопасность
|
||||
JWT_SECRET=your-super-secret-key-change-in-production
|
||||
|
||||
# Telegram WebApp
|
||||
NEXT_PUBLIC_BOT_USERNAME=CampFireIDBot
|
||||
NEXT_PUBLIC_BOT_TOKEN=7641998551:AAF_2-av1rUy_-icQ1fsfHOyYBGFt8cEmE4
|
||||
NEXT_PUBLIC_WEBAPP_URL=https://t.me/CampFireIDBot/app
|
||||
|
||||
# Telegram Bot
|
||||
TELEGRAM_BOT_TOKEN=7641998551:AAF_2-av1rUy_-icQ1fsfHOyYBGFt8cEmE4
|
||||
TELEGRAM_APP_ID=your_app_id_here
|
||||
TELEGRAM_APP_HASH=your_app_hash_here
|
||||
|
||||
|
||||
# JWT
|
||||
JWT_SECRET=campfire
|
||||
|
||||
# Ap
|
||||
NEXT_PUBLIC_URL=http://localhost:3000
|
||||
NEXT_PUBLIC_API_URL=http://localhost:3001/api
|
||||
NODE_ENV=development
|
||||
TELEGRAM_APP_HASH=your_app_hash_here
|
16
env.d.ts
vendored
Normal file
16
env.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
declare namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
NEXT_PUBLIC_URL: string;
|
||||
NEXT_PUBLIC_API_URL: string;
|
||||
NEXT_PUBLIC_BOT_USERNAME: string;
|
||||
NEXT_PUBLIC_BOT_TOKEN: string;
|
||||
NEXT_PUBLIC_WEBAPP_URL: string;
|
||||
PORT: string;
|
||||
NODE_ENV: 'development' | 'production' | 'test';
|
||||
MONGODB_URI: string;
|
||||
JWT_SECRET: string;
|
||||
TELEGRAM_BOT_TOKEN: string;
|
||||
TELEGRAM_APP_ID: string;
|
||||
TELEGRAM_APP_HASH: string;
|
||||
}
|
||||
}
|
@ -15,6 +15,22 @@ const nextConfig = {
|
||||
});
|
||||
return config;
|
||||
},
|
||||
images: {
|
||||
domains: ['t.me', 'telegram.org'],
|
||||
},
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/:path*',
|
||||
headers: [
|
||||
{
|
||||
key: 'Access-Control-Allow-Origin',
|
||||
value: '*',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
Loading…
Reference in New Issue
Block a user