Skip to content

Instantly share code, notes, and snippets.

@cryptobuks
cryptobuks / node_nginx_ssl.md
Created September 8, 2021 06:59 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@cryptobuks
cryptobuks / ec2-rai-node.md
Created February 9, 2018 00:09 — forked from numtel/ec2-rai-node.md
Install rai_node on EC2 Ubuntu instance

Follow these instructions to start an EC2 instance running Ubuntu that will run rai_node on startup

  1. Select Ubuntu Server 16.04 LTS (HVM), SSD Volume Type. A t2.small or larger instance type is recommended.

  2. Configure the security group to match the screenshot.

  3. Download install_rai_node.sh below, update the URLs with their latest versions.

    Get latest rai_node archive URL from https://github.com/clemahieu/raiblocks/releases.

    Get latest gdrive-linux-x64 version URL from https://github.com/prasmussen/gdrive#downloads

<?php if (!defined("IN_WALLET")) { die("Auth Error!"); } ?>
<?php
class Client {
private $uri;
private $jsonrpc;
function __construct($host, $port, $user, $pass)
{
$this->uri = "http://" . $user . ":" . $pass . "@" . $host . ":" . $port . "/";
$this->jsonrpc = new jsonRPCClient($this->uri);
}