Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Latest commit

 

History

History
44 lines (32 loc) · 1 KB

README.md

File metadata and controls

44 lines (32 loc) · 1 KB

#Serve Stellar federation from your domain using nodejs and express

##Dependencies

  • Nodejs
  • npm

##Setup

SSL is required. You can choose whether to terminate SSL in node, or to run the server behind a reverse proxy.

First, install express and https (assuming you want to terminate in node).

npm install -g express
npm install -g https

Next, the domain, Stellar address, and SSL certificate at the top of stellarFederation.js. (Per the comment, https://ngrok.com/ can give you an SSL-secured localtunnel if you'd like to test federation.)

// Configure federation
var DOMAIN_NAME = 'example.com';
var STELLAR_ADDRESS = 'Stellar address goes here';

// Configure SSL, if you'd like to terminate it in Node. For testing
// without your own SSL certificate, use https://ngrok.com/ to set up
// an SSL-secured localtunnel.
var USE_SSL = false;
var PRIVATE_KEY_PATH = 'sslcert/server.key';
var CERTIFICATE_PATH = 'sslcert/server.crt';

##Usage

Run the server.

node stellarFederation.js