Skip to content

satwiksharma01/crypto-dex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEX Platform

A decentralized cryptocurrency exchange platform with optimized memory usage and performance.

Features

  • Cryptocurrency trading
  • Optimized for low memory consumption
  • Multiple server options for different environments
  • Responsive UI
  • Real-time price updates

Memory Optimization

This project has been specifically optimized to handle Out of Memory errors:

  • Sequential script loading to prevent memory spikes
  • Optimized asset loading
  • Memory-efficient server implementations
  • Garbage collection tuning

Installation

  1. Clone this repository
  2. Install dependencies:
npm install
  1. Configure your CoinLayer API key in the .env file:
COINLAYER_API_KEY=your_api_key_here

Running the DEX

For Windows users:

Use one of the following start scripts:

  • start-dex-minimal.bat - Recommended for most users (uses built-in Node.js modules)
  • start-memory-fixed-dex.bat - Alternative for Express-based server

Using Node.js directly:

# Run the memory optimization first
node fix-memory-issues.js

# Then start the minimal server
node minimal-server.js

Server Options

This project provides multiple server implementations:

  1. Minimal Server (minimal-server.js)

    • Uses only built-in Node.js modules
    • Lowest memory footprint
    • Recommended for most users
  2. Express Server (serve-dex.js)

    • Uses Express.js
    • More features but higher memory usage
    • Useful for development

Memory Troubleshooting

If you still encounter memory issues:

  1. Increase memory limit in the NODE_OPTIONS setting
  2. Run node fix-memory-issues.js before starting the server
  3. Use the minimal server option for lowest memory usage

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors