generated from ztimson/template
Home screen update
All checks were successful
Build and publish / Build Container (push) Successful in 1m28s
All checks were successful
Build and publish / Build Container (push) Successful in 1m28s
This commit is contained in:
27
src/environment.js
Normal file
27
src/environment.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import {dirname, join} from 'path';
|
||||
import {fileURLToPath} from 'url';
|
||||
import * as dotenv from 'dotenv';
|
||||
|
||||
dotenv.config({path: ['.env','.env.local'], debug: false, quiet: true});
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = join(dirname(__filename), '..');
|
||||
const storage = join(__dirname, 'storage');
|
||||
|
||||
export const environment = {
|
||||
port: process.env.PORT || 3000,
|
||||
publicUrl: process.env.PUBLIC_URL || `http://localhost:${process.env.PORT || 3000}`,
|
||||
llm: {
|
||||
host: process.env.LLM_HOST || '',
|
||||
model: process.env.LLM_MODEL || 'default',
|
||||
token: process.env.LLM_TOKEN || 'ignore',
|
||||
context: process.env.LLM_CONTEXT ? +process.env.LLM_CONTEXT : 60_000.
|
||||
},
|
||||
paths: {
|
||||
public: join(__dirname, 'public'),
|
||||
storage,
|
||||
navi: join(storage, 'navi'),
|
||||
protocols: join(storage, 'protocols'),
|
||||
worlds: join(storage, 'worlds')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user