HollaEx®
⚙️ DashboardStart →
  • HollaEx® — The Crypto Exchange Solution
  • ☁️Cloud Operators
    • Launching the Exchange
    • Setting Domain for Cloud Exchanges
    • Easy SMTP for Cloud Exchanges
    • SEO Settings for Cloud Exchanges
      • SEO Advanced Settings
  • ⚙️Operating Your Exchange
    • Operator Control Panel
      • General
      • Users
      • User Profile
      • Assets
      • Markets
      • Stakes
      • Sessions
      • Plugins Apps
      • Trading Fees & Account Tiers
      • Roles
      • Chat
      • Billing
    • Customize Exchange
      • Browser Tools
        • Enter Edit Mode
        • Operator Controls (Visuals)
        • Console
      • Plugins
      • Forked Repo
    • Fiat Controls
      • Initial Setup
      • Setting Up Fiat On/ Off Ramp
      • Editing Deposit & Withdrawal Fees
      • Users Making Fiat Deposit
      • Users Trading With Fiat
      • User Making Fiat Withdrawal
    • Staking
    • OTC Broker
    • P2P
      • P2P Overview
      • P2P Setup
      • P2P Troubleshooting
      • P2P Vendor Flow
    • Smart Chain Trading
    • Assets & Trading Pairs
      • Add New Assets & Trading Pairs
      • Configure Pair Parameters
    • Set up the SMTP Email
      • Set up SMTP with AWS SES
      • Set up SMTP with Mailgun
      • Set up SMTP with SendGrid
      • Test the SMTP with Gmail
    • Enabling reCAPTCHA
    • Email Customization & Audit
    • DeFi Asset Staking Process
  • 🧩Plugins
    • HollaEx Plugins
      • Announcements
      • Bank
      • AWS SNS (Text Messages - SMS)
      • KYC
      • Automatic KYC
      • Messente
      • Advanced Referral
      • CoinMarketCap
      • Guardarian
    • Install Plugins
    • Developing Plugins
      • Development Walkthrough: Hello-Plugin
        • Initialization
        • Configuration
        • Scripting
        • Web View
        • The Final Product & Installation
      • Advanced
        • Initialization
        • Config
        • Server Script
        • Plugin Libraries
        • Web View
        • Final Plugin Product
        • Advanced Tutorial: Using the user meta field
        • Advanced Tutorial: Adding a new database table column
        • Advanced Tutorial: Creating a new database table
      • Simple Wallet Example
      • Web View Development
        • Overview
        • External dependencies
        • Getting started
        • Basic Tutorial: Hello Exchange Plugin web view
        • Advanced Tutorial: KYC Plugin web views
    • Bank Integration
      • Handling Deposits
      • Handling Withdrawals
  • 👷Developers
    • API Guide
      • API Example Scripts
    • Run Dev Mode
    • Build a New Front-end Interface
  • 🧰On-Premise Operators (Advanced Only)
    • On-Premise Exchange Setup
      • Getting Started — Requirements
      • Installation
      • Server Setup
      • Web Setup
      • Production
    • CLI How-Tos
      • Start Exchange
      • Stop Exchange
      • Upgrade Exchange
        • Build and Apply the Code Changes
      • Get Exchange Logs
      • Get a Backup and Restore
      • Exchange Migration
      • Command List
    • Run Exchange on Kubernetes
    • Troubleshooting Guide
  • 🚀Advanced
    • SEO Optimization
    • Nginx
    • Rate Limits
    • Database
      • Upgrade Database
    • Dependencies
    • Contents Delivery Network
      • Cloudflare CDN for HollaEx
      • CloudFront CDN for HollaEx
    • Load Balancer
      • AWS ELB
      • DigitalOcean LB
    • Customize Kubenretes Ingress
    • Exchange Keys
      • Exchange API Keys Troubleshoot
    • HollaEx on non-Linux
      • HollaEx on Windows
      • HollaEx on macOS
    • The Network Tool Library
      • Accessing the Network Tool Library
      • Functions
        • WebSocket
      • Simple Example: Creating a User and Wallet
      • Getting More Interesting: Orders with the Tools
        • Setup: Using the transferAsset function
        • Creating and Monitoring a Sell Order
        • Settling Fees
      • Private HollaEx Network
    • Docker Content Trust (DCT)
    • Revenue Sharing
  • 📦Releases
    • Release Notes
    • Side Notes
  • ➡️External Links
  • Blogs
  • Forum
  • Videos
  • Twitter X
  • Telegram
  • Interactive Demo
  • Discord Community
  • API Documentation
  • Tools Library Documentation
  • Node Library Documentation
  • Plugins Documentation
Powered by GitBook
On this page
  • Before You Start - Dev Mode
  • Create the Script
  • Run the Script
  1. Plugins
  2. Developing Plugins
  3. Advanced

Server Script

The script described here provides the back-end of our plugin

PreviousConfigNextPlugin Libraries

Last updated 2 years ago

The server script, script.js defines what libraries are imported and is what will get us to our end goal

Before You Start - Dev Mode

Before you start, make sure you have an exchange running in on your machine. It is important to have the exchange running in dev mode instead of a standard production CLI setup.

Dev mode exchange has live code updates and any changes in the code will get immediately applied which will make your development experience much better as a developer.

Create the Script

Looking inside the plugins/src/plugins/<YOUR_PLUGIN> you will see that the created a server folder for us. This is the folder where the config.json was made.

  1. Create a new file in this server folder called script.js

  2. Code script.js to whatever goal you have in mind for the plugin (I recommended here looking below at the hello-exchange walkthrough to get an idea of how a script can look)

script.js is the server-side code that runs during runtime into the server's plugin container. The server script has access to many available in the HollaEx Kit.

The most important library of all is the which has all the main features you need.

If at any point, you become unsure of the structure of either your plugin's folders or the code within the files themselves, take a look at the example on GitHub to see how plugin structure should be organized.

Run the Script

Ensure you have executed npm install before running the command below.

You may also need to add sudo at the beginning of the command above depending on your OS.

In addition, make sure CORS has been disabled on your browser (this can be tricky in Firefox, so Chrome may be easier to work with).command

Finally, for the run comand to work, you will need python 2 on your machine, this can be installed for Linux with sudo apt install python

To run the script on your dev mode exchange, you need to go to /plugins and run:

npm start --plugin=<PLUGIN_NAME>

Remember this will need to be done in a new terminal as dev mode will block any input on the terminal it was started on

To see if this has worked try accessing localhost:8080/config.json, and you will see the config file of the plugin

🧩
dev mode
initialization
HollaEx Tools Library
hello-exchange
libraries