Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swap

Tokens

react-dex

License

The react-dex is a decentralized exchange built using React and NodeJS. It allows users to connect their digital wallet and exchange digital tokens. It also presents the available tokens for swapping in the Tokens page.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

  • NodeJS
  • Metamask or another Ethereum wallet for interacting with your contracts

Installation

  1. Clone the project repository:
git clone https://github.com/hadesbaker/nextjs-dex.git
cd nextjs-dex
  1. Install the required frontend dependencies:
cd dex
npm install
# or
yarn install

And then install the required backend dependencies:

cd ..
cd dexBack
npm install
# or
yarn install

Usage

In the dexBack folder, create a file called .env. Within the .env file, add a MORALIS_KEY variable with the moralis api key you can get from here.

i.e. MORALIS_KEY=dwindwdiwndiwniwndiwdinwdinwdidindiwn

In a seperate terminal window, run the backend node server:

Run the backend server:

cd dexBack
node index.js

In another terminal window, run the development server::

cd ..
cd dex
npm run start
# or
yarn start

Finally, open http://localhost:3000 with your browser to see the result.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Check out our Next.js deployment documentation for more details.

About

The react-dex is a decentralized exchange built using React and NodeJS. It allows users to connect their digital wallet and exchange digital tokens. It also presents the available tokens for swapping in the Tokens page.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages