This is a Web API designed to support the Xenia Xbox 360 emulator in providing Online and Multiplayer functionality. A fork of Xenia-Canary has been created for use with this Web API. It has been designed and developed specifically for Xenia, and does not represent or resemble any first-party Xbox API.
If you'd like to help improve this project, you may report issues or contribute by submitting PRs.
This project uses NestJS a Node.js framework using Typescript which follows the CQRS model. In addition, MongoDB a document-oriented database (NoSQL database).
npm install
command..env
file in the project root, following this structure. API_PORT=36000
MONGO_URI=mongodb://127.0.0.1:27017/
SWAGGER_API=true
SSL=true
This Xenia Web API is dependant on a MongoDB database.
Database Structure
└─── test
│ leaderboards
| players
| sessions
MONGO_URI=mongodb://127.0.0.1:27017/
SSL=true
SWAGGER_API=false
Build the web service with the npm run build
command.
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
You can check everything is setup and working by accessing the frontend at http://127.0.0.1:36000/.
Heroku\ You can easily setup and host this REST API on Heroku, however they do not offer a free tier.
Vercel\ Vercel is another option and it offers a free tier. However, i don't know how easy it will be to setup and configure.
If you would like to add a title to this API, check out the titles
folder for examples!
Titles can provide a 'title server' address, which is basically an IP address the game will try to connect to and use as a game-server. Not all games use the 'title server' system.
Titles can also provide 'port mappings', wherein you can reroute game ports for title servers or player communication. We recommend using ports 3600X for players and 3601X for title servers. If a title uses a random port, this can be captured as port 0, and mapped accordingly.
Port mappings are not a requirement it's an optional feature. It may be useful to map ports which conflict with Windows or Linux. Some titles may fail to work if ports are changed for example Source Engine games.
To find the ports the title opens you can use cports and filter by process or you can search through xenia.log
with logging = true
.
Titles must provide leaderboard configuration to push statistics to the API. This is more complicated and takes trial and error. I'd recommend self-hosting the API to debug this.
Finally, you can also throw any title-specific netplay related patches in the patches
folder!