UNPKG

@hhoangphuoc/escape-room-cli

Version:

A CLI for playing AI-generated escape room games. Install globally with: npm install -g @hhoangphuoc/escape-room-cli

13 lines (12 loc) 503 B
import dotenv from "dotenv"; dotenv.config(); export const VERCEL_DOMAIN = "https://ai-escape-room-sable.vercel.app"; // The environment variable the CLI will check for a custom API URL. const LOCAL_API_URL = process.env['LOCAL_API_URL']; //http://localhost:3001 export const getApiUrl = () => { if (LOCAL_API_URL) { // console.log(`Using API URL from environment variable ${process.env['LOCAL_API_URL']}: ${LOCAL_API_URL}`); return LOCAL_API_URL; } return VERCEL_DOMAIN; };