The project includes 2 sub-projects. The nodejs API and the Fronend.
Includes the rest API node.js project. Here we use Moralis to return the latest token prices to frontend.
Includes the react.js project. This is where the magic happens. We connect users to MetaMask wallet and use the 1inch public API to swap the real tokens.
Clone this repo and do the following:
API server
- Inside the API directory create a .env file just like .env.example
- go to moralis.io and signup and get an API key and set the MORALIS_KEY inside .env
- Run “npm install” and then “node index.js” to run the server
Frontend part
Inside the frontend directory run “npm install” and then “npm run start”