一键导入
railway
Railway deployment reference for The Bridge. Use when deploying, managing environments, checking logs, or configuring Railway infrastructure.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Railway deployment reference for The Bridge. Use when deploying, managing environments, checking logs, or configuring Railway infrastructure.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
EvenHub CLI reference for packing, publishing, and managing Even Realities G2 apps. Use when building .ehpk packages, configuring app.json, generating QR codes, or working with the EvenHub developer platform.
The Bridge UI design system based on even-toolkit design tokens. Use when building or styling UI components, working with CSS custom properties, color tokens, typography, spacing, or any frontend UI work.
The Bridge app architecture reference. Use when adding features, refactoring server or frontend code, creating new routes, services, or UI modules. Covers Express server patterns, frontend ES module structure, state management, and file organization conventions.
Generate a QR code PNG for the The Bridge ngrok tunnel. Trigger when the user asks to make/generate/update a QR code.
Even Realities G2 smart glasses SDK v0.0.9 reference. Use when building or modifying G2 glasses features, display layouts, event handling, audio recording, IMU, container management, or anything related to the glasses hardware and firmware.
| name | railway |
| description | Railway deployment reference for The Bridge. Use when deploying, managing environments, checking logs, or configuring Railway infrastructure. |
Deploy The Bridge to Railway for production. Uses Railpack builder (auto-detects Node.js from package.json). Dev stays on localhost + ngrok.
# First time
railway login
railway init # or: railway link (existing project)
railway up # deploy
railway domain # generate public URL
# Subsequent deploys
railway up
Railway MCP is configured in Claude Code. Use natural language to:
deploy the app)show deploy logs)set OPENAI_API_KEY to sk-xxx)| Tool | Description |
|---|---|
check-railway-status | Verify CLI + auth |
list-projects | List all projects |
create-project-and-link | Create + link project |
list-services | Show services |
link-service | Link service to cwd |
deploy | Execute deployment |
create-environment | Create env (staging, etc.) |
list-variables | Show env vars |
set-variables | Set env vars |
generate-domain | Create .railway.app domain |
get-logs | Build/deploy logs |
{
"build": {
"builder": "RAILPACK",
"buildCommand": "npm run build"
},
"deploy": {
"startCommand": "npm start",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 5
}
}
Config in code overrides dashboard settings. Resolution order: environment-specific > base config > dashboard.
package.json -> Node.jsnpm install (devDependencies included for tsc)npm run build (tsc && cp -r src/public dist/)npm start (node dist/server.js)NODE_ENV=production, NPM_CONFIG_PRODUCTION=falseRailway injects PORT at runtime (not 3000). Our server already reads process.env.PORT || "3000", so it works automatically.
Use env vars for credentials on Railway (not settings.json). Our app already supports env var fallback.
railway variable set OPENAI_API_KEY=sk-xxx
railway variable set TELEGRAM_API_ID=12345 TELEGRAM_API_HASH=abc123
railway variable set SLACK_USER_TOKEN=xoxp-xxx
railway variable set GMAIL_ADDRESS=you@gmail.com GMAIL_APP_PASSWORD=xxxx
railway variable list
railway variable delete KEY_NAME
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key (required for STT) |
| Variable | Description |
|---|---|
TELEGRAM_API_ID | Telegram app API ID |
TELEGRAM_API_HASH | Telegram app API hash |
SLACK_USER_TOKEN | Slack User OAuth Token (xoxp-...) |
GMAIL_ADDRESS | Gmail email address |
GMAIL_APP_PASSWORD | Gmail 16-char app password |
railway login # authenticate (opens browser)
railway login --browserless # headless auth
railway init # create new project
railway link # link to existing project
railway up # deploy
railway up --detach # deploy without log streaming
railway domain # generate public URL
railway logs # stream runtime logs
railway logs --build # build logs
railway status # project info
railway open # open dashboard in browser
railway redeploy # re-run latest deployment
railway restart # restart service
railway down # remove latest deployment
railway run npm start # run locally with Railway env vars
| Dev | Production | |
|---|---|---|
| Run | npm run dev | npm start (via Railway) |
| URL | localhost:3000 + ngrok tunnel | xxx.railway.app |
| Credentials | Settings UI -> settings.json | Environment variables |
| G2 access | QR code with ngrok URL | QR code with Railway URL |
| Deploy | Hot reload (tsx watch) | railway up or git push |
If the Settings UI (settings.json) is needed on Railway instead of env vars, attach a Volume:
/app/dataRAILWAY_VOLUME_MOUNT_PATH/settings.jsonFor most cases, env vars are simpler and recommended.
railway.json:
{
"build": {
"watchPatterns": ["src/**", "package.json", "tsconfig.json"]
}
}