Server Setup - HeliosOrg/SimpleDataIntegration GitHub Wiki
1) Download and setup the server
- Clone https://github.com/HeliosOrg/SimpleDataIntegrationServer onto your server (AWS, Digital Ocean, etc).
- Install node.js on your server if you haven't already.
- Run
npm install .
in theSimpleDataIntegrationServer
directory.
2) Setup the JSON file
The Simple Data Integration nodes in both the client (UE4) and the server are generated from an input.json
file. Note that the input.json
file should be the same on the client and the server.
- In the
input.json
file inside theSimpleDataIntegrationServer
directory, specify the name (in upper camel case) and type (one ofint
,bool
,FString
, orfloat
) of each variable you want to create a simple interface for in UE4. These names will correspond to both your server endpoints as well as the node headers in your Blueprints client. - Add the URL of your own server to the start of
input.json
. For example, in the sample below, your server URL would replacehttp://ec2-54-100-240-19.us-west-1.compute.amazonaws.com/helios/
. - IMPORTANT When you set up the plugin in UE4, make sure the
input.json
file there is the exact same as the one on the server.
\\\ Sample input.json
{
"server_url": "http://ec2-54-100-240-19.us-west-1.compute.amazonaws.com/helios/",
"single_instance_variables": [
{
"name": "IsLightOn",
"type":"bool"
},
{
"name": "NumKills",
"type":"int"
},
{
"name": "UserName",
"type": "FString"
},
{
"name": "WinPercentage",
"type": "float"
}
]
}
3) Setup the database
- If you haven't already, install redis by following these instructions or running
brew install redis
on Mac. - Run
redis-server --daemonize yes
to start your redis server, which serves as the database.
4) Run the server
- Run
node createServer.js
This creates a correspondingserver.js
file. - Fire up the server by running
node server.js
. If you want your server to be persistent, install something likeforever
by runningnpm install forever -g
and then run the server withforever server.js
.
5) Setup the plugin
- Follow the plugin setup instructions.