Source code of the https://rider.microcoin.hu project
MicroCoin Rider is an API server for the MicroCoin ecosystem. It acts as the interface between MicroCoin network and applications that want to access the MicroCoin network. It allows you to submit transactions to the network, check the status of accounts, subscribe to transactions, etc. Rider provides a RESTful API to allow client applications to interact with the MicroCoin network. You can communicate with Rider using cURL or just your web browser. However, if you’re building a client application, you’ll likely want to use a MicroCoin SDK in the language of your client.
Before you start developing useful to download the MicroCoin wallet. You can download the latest version from here MicroCoin Wallet
- Download MicroCoin wallett, or build a daemon and run it
- Clone this repository and init submodules
- Run
dotnet build - Run
dotnet publish - Run the server using the
dotnet runcommand
Download and run the MicroCoin Daemon
Install dotnetcore
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1Publish the project
dotnet publish --configuration ReleaseCopy the files to the server (eg. to /var/microcoinapi)
Create a service
sudo nano /etc/systemd/system/microcoin.servicePaste this:
[Unit]
Description=MicroCoin API
[Service]
WorkingDirectory=/var/microcoinapi
ExecStart=/usr/bin/dotnet /var/microcoinapi/MicroCoinApi.dll
Restart=always
RestartSec=10 # Restart service after 10 seconds if dotnet service crashes
SyslogIdentifier=microcoin-api
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.targetEnable the service:
sudo systemctl enable microcoin.serviceStart the service:
sudo systemctl start microcoin.serviceTo check your node, point your browser to: http://yourdomain.com:5000
Install nginx
sudo apt-get install nginx
sudo /etc/init.d/nginx startConfigure nginx
server {
listen 80;
server_name yourdomain.com *.yourdomain.com;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Configure the firewall
sudo apt-get install ufw
sudo ufw enable
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 4004/tcp
# on testnet: sudo ufw allow 4104/tcp