Dragonfruit Cactus (Selenicereus undatus, formerly Hylocereus undatus), and its close relatives, can grow fairly quickly with plenty of light, warmth, water (with good drainage), and fertilizer, but you should expect at least a couple years to get any fruit from a cutting that size. I suppose it could be possible to grow it for indoor fruit production but you will have to give the plants a lot of light since they only flower during long day, short night conditions. Even in the tropics, growers have to supply supplemental light to plants growing outdoors in order for them to flower and set fruit during the slightly reduced light of a tropical winter.
The light requirements that have evolved for tropical plants to flower is somewhat surprising, but usually it is indirectly tied to greater reproductive success during a seasonal wet or dry season. At both the Tropic Lines (Tropic of Cancer and Tropic of Capricorn) there is 13 hours and 35 minutes of daylight during each hemisphere's Summer Solstice and 10 hour and, 41 minutes during each hemisphere's Winter Solstice. Dragonfruit is a long day, short night bloomer, but other tropical plants such as Poinsettia (Euphorbia pulcherrima) are short day, long night bloomers. I suppose I've gone off on a tangent, but it is interesting and it does have some direct application to getting plants to flower under artificial light.
By the way if you are looking for an inexpensive dragonfruit cutting, remember all of those oddly colored Moon Cacti (Gymnocalycium mihanovichii) that are sold as novelties are grafted onto stems of Selenicereus undatus. Then again you may want to pay more to ensure that you get the best fruiting cultivar of your choice.