Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
bug fix for backend services not running
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Aug 18, 2024
1 parent 5645bb8 commit bf45ddc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"dev-docker": "cd scripts && ./start-containers.sh",
"dev-docker-windows": "cd scripts && docker-compose up -d && docker-compose up -d -f docker-compose-minio.yml",
"dev-tabs": "npm run dev-docker && cd scripts && ./dev-tabs.sh",
"fetch-projects": "lerna exec 'git fetch -p && git rebase' --parallel --ignore @etherealengine/* --no-bail",
"fetch-projects": "lerna exec 'git fetch -p && git rebase' --parallel --no-bail",
"dev-reinit": "./scripts/checkenv.sh && npm run dev-docker && cd packages/server && npm run dev-reinit-db",
"dev-server": "cd packages/server && npm run dev",
"dev-windows": "npm run dev-docker-windows && concurrently -n agones,server,client npm:dev-agones-silent npm:dev-server npm:dev-client",
Expand Down
15 changes: 11 additions & 4 deletions packages/server-core/src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,20 @@ import WorldServices from './world/services'
const installedProjects = fs.existsSync(path.resolve(__dirname, '../../projects/projects'))
? fs
.readdirSync(path.resolve(__dirname, '../../projects/projects'), { withFileTypes: true })
.filter((dirent) => dirent.isDirectory())
.map((dirent) => {
.filter((orgDir) => orgDir.isDirectory())
.map((orgDir) => {
return fs
.readdirSync(path.resolve(__dirname, '../../projects/projects', orgDir.name), { withFileTypes: true })
.filter((projectDir) => projectDir.isDirectory())
.map((projectDir) => `${orgDir.name}/${projectDir.name}`)
})
.flat()
.map((projectName) => {
try {
const configPath = `../../projects/projects/${dirent.name}/xrengine.config.ts`
const configPath = `../../projects/projects/${projectName}/xrengine.config.ts`
const config: ProjectConfigInterface = require(configPath).default
if (!config.services) return null
return path.join(dirent.name, config.services)
return path.join(projectName, config.services)
} catch (e) {
// console.log(e)
}
Expand Down

0 comments on commit bf45ddc

Please sign in to comment.