Clone project and setup environment variables:
git clone git@github.com:oceanprotocol/df-web.git
cd df-web/
# copy and setup environment variables
cp .env.example .env
Then start the development version of the app by using either Docker, or your local system:
# using Docker
docker-compose up
# or using local system
npm install
npm run dev
Navigate to localhost:8080. You should see your app running. Edit a component file in src
, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv
commands in package.json to include the option --host 0.0.0.0
.
You may also need to update the following files to configure your environment:
- Update
address.json
insidesrc/utils/addresses/
w/ the latest contract address.json file generated by our build system. If you are building locally using Barge, your address.json file should be somewhere in the OCEAN_HOME directory~/.ocean/ocean-contracts/artifacts/address.json
- If you're using Visual Studio Code we recommend installing the official extension Svelte for VS Code. If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.
To create an optimised version of the app:
npm run build
Every Pull Request gets its own preview build via Vercel's GitHub integration.
The main
branch is always deployed to df-web-oceanprotocol.vercel.app.
Live deployments happen...