They are a member of the Goby family, along with mudskippers and a large variety of saltwater fish, which the pelvic fin is fused into a foot like appendage. Gobies are opportunistic carnivores, generally however the Violet Goby is more content to sift through your substrate for food. Sand is best as they will take a mouth full and sift through it for goodies.
Other than that, they do fine in freshwater, but they will thrive in the low end brackish water between 1.004 and 1.008 sg.
They need calcium, and a variety of nutrients to live well. Different worms frozen or live will make up much of it's diet.
Your water quality also is important, they are more sensitive to Ammonia than other fish I have kept.
your goal is:
0 Ammonia
0 Nitrites
< 20 Nitrates
Uneaten food will spoil the water so remove anything after 1 hour if it remains uneaten.
more reading if you like:
Care Sheet For Dragon Goby - Brackish Fish - 85775