Reputation: 125
I'm currently working on a project to port the Cloud9 IDE to the server software Sandstorm. I've only been working with it for a few days and I would certainly appreciate some guidance from those more experienced. I'm hoping you all may have a few suggestions for me.
Using the tools that Sandstorm has created, I am able to use either the raw port information from the Sandstorm instance, or use a specified port from which to access it. Using the raw port information, I get this message:
Command: spk init -r -- node server.js
Error: remote exception: Peer disconnected.
C++ location:(remote):??
type: disconnected
When using a specified port (I read somewhere that 8080 was the appropriate port), I simply get a white screen with a message saying "waiting on server".
Command: spk init -p 8080 -- node server.js
Is there a setting to change within the Cloud9 settings or is it something on the Sandstorm side? I would appreciate the help!
Upvotes: 2
Views: 172
Reputation: 45151
spk init -r
is for apps which directly implement Sandstorm's low-level Cap'n Proto API. If you are porting an existing HTTP-based app, you'll want to use -p
.
The port number you should pass is the port on which Cloud9's server will listen for HTTP traffic. 8080 is a common one, but this differs from app to app. It looks like Cloud9 uses 8181 by default, so you'll want to do:
spk init -p 8181 -- node server.js
Alternatively, Cloud9 lets you set the port with a flag, so you could do:
spk init -p 8080 -- node server.js --port 8080
But there's no particular advantage to this.
PS. Thanks for asking the first Sandstorm question on Stack Overflow! I've created the new "sandstorm.io" label for these and subscribed to it, so in the future I'll see these questions much more quickly. Sorry that this one took a while!
Upvotes: 2