Skip to content

Instantly share code, notes, and snippets.

@gotomypc
Forked from mrjjwright/expose_secure_db.coffee
Created October 28, 2012 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gotomypc/3968024 to your computer and use it in GitHub Desktop.
Save gotomypc/3968024 to your computer and use it in GitHub Desktop.
Expose Secure DB over node
# Start up the http server
console.log("Starting on port #{options.port}")
server.listen(options.port)
# Start up dnode and expose our remote secure API to the user. This API has built-in token based security so we will be ok if the
# web-socket is over https
remote =
db: dbSecure
dnode(remote).listen(server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment