Remoting.js, server/RemotingController.js, tests/RemotingTest.js
I decided not to use now.js but instead implement my own remote service framework. The framework will essentially copy services from the server to the client and replace any functions with callbacks to server/client. That way, if a remote service returns an object that should really exist only on the server, it can stub out the methods of that object so they call back into the server.
server/mongodb.js
Very basic HTTP endpoint for interacting with the MongoDB document store.
My next tasks are to implement
- The Socket.IO services so that multiple people can interact/get notifications
- Refactor commands so they are easier to create
Oh and some things I learned on the way:
- NodeMON is essential for rapid development
- Never return anything, it will just cause you headaches later, use callback functions
- If you want to interact with MongoDB via HTTP Sleepy.Mongoose is quite good but you'll run into cross-site issues if it runs on a different port
- Javascript has a with keyword... i need to try it
https://code.google.com/p/node-js-mud/