project-serum / serum-dex-ui

Example implementation of a UI for the Serum DEX
Other
356 stars 538 forks source link

Document how to run on a localnetwork #51

Open armaniferrante opened 3 years ago

armaniferrante commented 3 years ago

We should document how to run this on a local network, preferably with a simple script to build and deploy everything.

dahifi commented 3 years ago

Ok, so I'm working through this right now.

Was able to get things up and running without much trouble, just need to get the TV library and make sure you prepend /* eslint-disable no-unused-expressions */ to src/charting_library/charting_library.esm.js.

dahifi commented 3 years ago

The following will get the front-end up and running. Assuming you have access to the TV library.

git clone git@github.com:project-serum/serum-dex-ui.git && cd serum-dex-ui
git clone git@github.com:tradingview/charting_library.git 

cp ./charting_library/charting_library ./src/ -r
echo -e "/* eslint-disable no-unused-expressions */ \n$(cat src/charting_library/charting_library.esm.js)" > src/charting_library/charting_library.esm.js
cp ./charting_library/charting_library ./public/ -r
cp ./charting_library/datafeeds ./public/ -r

yarn
npx browserslist@latest --update-db\n
yarn start

Charts will not work without as they rely on Bonfida's paid data feed. There are 3rd party repos that can index Serum market history, but I'm not sure what the official option is.

Tejas-Teju commented 2 years ago

@dahifi I am not able to add market on running both "serum-dex" and "serum-dex-ui" locally. I am getting timeout issue