Download server.mjs from xlt99/EmboDi: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/spaces/xlt99/EmboDi/resolve/main/server.mjs
- Command line
-
hf download hf://spaces/xlt99/EmboDi/server.mjs
-
curl -L -o server.mjs https://huggingface.co/spaces/xlt99/EmboDi/resolve/main/server.mjs
772 Bytes
| import {fileURLToPath} from 'node:url'; | |
| import {join,resolve} from 'node:path'; | |
| import {applyBrandEnvironment} from './src/services/brand-env.mjs'; | |
| import {initializeAuthoringData} from './src/services/authoring-data.mjs'; | |
| import {installSampleActor} from './src/services/sample-actor.mjs'; | |
| const root=fileURLToPath(new URL('.',import.meta.url)); | |
| applyBrandEnvironment(); | |
| if(Number(process.versions.node.split('.')[0])<22)throw Error('Node.js 22+ required'); | |
| process.env.PORT||='8080'; | |
| process.env.VRBUILD_DATA_DIR=resolve(process.env.VRBUILD_DATA_DIR||join(root,'data')); | |
| process.env.VRBUILD_EDITION='open-source'; | |
| await initializeAuthoringData(process.env.VRBUILD_DATA_DIR); | |
| await installSampleActor(process.env.VRBUILD_DATA_DIR); | |
| await import('./src/server/app.mjs'); | |