Dgraph Newbie question "404 page not found"

Hi,
I am quite new to Dgraph. I am using Mac.
I followed the get-start instruction, and ran following codes,

curl https://get.dgraph.io -sSf | bash

dgraph zero --port_offset -2000

curl localhost:6080/mutate -H "X-Dgraph-CommitNow: true" -XPOST -d $'
{                            
  set {                                
   _:luke <name> "Luke Skywalker" .
   _:leia <name> "Princess Leia" .
   _:han <name> "Han Solo" .
   _:lucas <name> "George Lucas" .
   _:irvin <name> "Irvin Kernshner" .
   _:richard <name> "Richard Marquand" .

   _:sw1 <name> "Star Wars: Episode IV - A New Hope" .
   _:sw1 <release_date> "1977-05-25" .
   _:sw1 <revenue> "775000000" .
   _:sw1 <running_time> "121" .
   _:sw1 <starring> _:luke .
   _:sw1 <starring> _:leia .
   _:sw1 <starring> _:han .
   _:sw1 <director> _:lucas .

   _:sw2 <name> "Star Wars: Episode V - The Empire Strikes Back" .
   _:sw2 <release_date> "1980-05-21" .
   _:sw2 <revenue> "534000000" .
   _:sw2 <running_time> "124" .
   _:sw2 <starring> _:luke .
   _:sw2 <starring> _:leia .
   _:sw2 <starring> _:han .
   _:sw2 <director> _:irvin .

   _:sw3 <name> "Star Wars: Episode VI - Return of the Jedi" .
   _:sw3 <release_date> "1983-05-25" .
   _:sw3 <revenue> "572000000" .
   _:sw3 <running_time> "131" .
   _:sw3 <starring> _:luke .
   _:sw3 <starring> _:leia .
   _:sw3 <starring> _:han .
   _:sw3 <director> _:richard .

   _:st1 <name> "Star Tqrek: The Motion Picture" .
   _:st1 <release_date> "1979-12-07" .
   _:st1 <revenue> "139000000" .
   _:st1 <running_time> "132" .
  }
}
'

I got

404 page not found

I also tried with different port numbers, ie., 8080.

Hi Eric,

You need to start atleast one Dgraoh server to run queries & mutations. Dgraph server listens to http on 8080.

dgraph server --memory_mb 2048 --zero localhost:5080

See here for running instructions.

https://docs.dgraph.io/get-started/#from-installed-binary

SaI

Thanks.
Right, Both commands should be run.

I thought zero and server are just different ways of start Dgraph.

It would have been better if there is a short description about what zero and server are.

Thanks for the feedback. We will update the document.