Quick Start
Get started with the surfDB
Caution: We are still in very early stage so things can break and change. The docs will be updated frequently.
We need to first install the surf server binary, currently only supported on linux and macos
Linux
MacOS
# download binary and add it to path
curl -L -o surf https://bafybeiaa3iplonzhxgda7zolwwy43pzfe3gqwodxzvzq3ywc7v3tkt4dtu.ipfs.gateway.valist.io/ipfs/bafybeiaa3iplonzhxgda7zolwwy43pzfe3gqwodxzvzq3ywc7v3tkt4dtu/surf-linux
chmod +x surf
sudo cp ./surf /usr/local/bin
curl -L -o surf https://bafybeiaa3iplonzhxgda7zolwwy43pzfe3gqwodxzvzq3ywc7v3tkt4dtu.ipfs.gateway.valist.io/ipfs/bafybeiaa3iplonzhxgda7zolwwy43pzfe3gqwodxzvzq3ywc7v3tkt4dtu/surf-macos
The binary has not been tested on macOS.
Then cd into the app folder and get the mongo and redis database up
docker-compose up -d
Run the binary
surf
# you can provide the following env variables to change the default values
# MONGO_URL="mongodb://root:[email protected]:27017/"
# REDIS_HOST="localhost"
# SURF_PORT="4200"
You should see the following output

Now we can run the app
yarn dev

Homepage
Authenticate yourself with the surf client by clicking on connect wallet.
Then open console and click on create data to create an entry in the database and check the result, then click on get data and see the data you created. You can even check the ceramic streamId given in the result on https://cerscan.com/
Check the api folder to see the api's we have created for data and auth.
Last modified 8mo ago