At 337 lbs, health and beauty influencer Janielle Wright was afraid she would die. Her body was in pain and she had trouble breathing at night.

“I was going to sleep worried that I wouldn’t wake up the next morning,” Wright told NBC News BETTER.

She was also afraid that she wouldn’t live to see her 3-year-old daughter, Novah, grow up. That was when Wright, 28, realized something had to change.

“This is no way to live thinking you’re going to die because you’re overweight and you’re unhealthy,” she says.

Intermittent fasting is a time-restricted eating method where you only allow yourself to eat within a certain window of time.

In January, Wright began her weight-loss journey through intermittent fasting. It’s a time-restricted eating method where you only allow yourself to eat within a certain window of time. Wright says the method helped her lose 65 pounds so far.

“I just prayed and asked that [God] could see me through this journey, and could be consistent and be patient, because I feel that patience is key when it comes to weight loss,” recalls Wright.

How it works

Research suggests that weight loss is impacted by when we eat as much as by what we eat, which means intermittent fasting may help spur metabolism. There are several different methods for intermittent fasting, some of which are more restrictive than others. Wright recommends starting out with a less restrictive regime until your body is accustomed to it.

Wright began intermittent fasting with the 16:8 method, which required her to eat within an 8-hour window and fast for 16 hours. She cut out breakfast, she says, and ate just two meals a day — the first at 12 p.m., and the last meal around 8 p.m.

“I was only eating lunch and dinner, and it’s meant for you not to snack too,” Wright explains.

She says she stuck to low-carb meals, and limited her calories to between 1,800 and 2,000 calories a day. She tracked her calories on the MyFitnessPal app.

Other intermittent fasting diets take a different approach. The 5:2 method, for example, requires you to eat as you normally would for five days a week, but on two nonconsecutive days, you eat just one meal a day. Wright says she spent five months conditioning her body to the 16:8 method. At that point, she says, she switched to the 20:4 method. According to this method, you fast for 20 hours and have a 4-hour eating window.

“I wanted a change,” says Wright. “I wanted to try to boost my weight loss even more.”

Wright says you should be cautious about using a more restrictive method like the 20:4. Condition your body on a less restrictive method for an extended period first, she says. Since the window of time for eating on the 20:4 method is small, Wright says you should be careful to space your meals apart and not eat all your calories in one sitting.

“I’ll maybe take like 30 minutes to digest some of that food,” she says, “and then I’ll go and eat the rest.”

Make sure you eat healthy

One thing Wright enjoys most about intermittent fasting is that you decide what kind of foods you want to eat (she prefers a low-carb diet). But she warns against junk food.

“It’s definitely important to eat nutritious food when you’re on the diet,” she says. “I feel like if I was doing intermittent fasting just eating pizza and burgers and fries, I feel like I wouldn’t have had the amount of success I have right now.”

She says it’s important to consume all the macros your body needs — proteins, fats and carbs — and to have nutritiously diverse meals

“I’ll have egg whites and spinach, and I’ll have some carrots fruit on the side ... [or] I’ll have maybe a chicken breast with some quinoa on the side,” Wright says.

Allow yourself up to three cheat meals a month

Fasting for long periods of time can become tedious. That’s why Wright lets herself have three cheat meals a month. Whether it’s nachos, Chinese food or a Subway sandwich, cheat meals help her stay balanced, she says. But she warns not to overdo it.

“Once I’m done with my cheat meal I move on,” says Wright.

Exercise consistently

Wright incorporates exercise into her weight loss routine, working out out six days a week. Since she had a lot of weight to lose in the beginning, she was careful not to push herself too hard at first — just a brisk 15-minute walk on the treadmill each day.

“But as I got more comfortable with walking on the treadmill, I upped my time and I upped my speed and my incline,” she says.

After seven months, Wright now walks on the treadmill about 45 minutes a day. She includes high inclines and keeps at “a really brisk [pace].” Afterwards, she does about 30 minutes of high-intensity interval training.

Intermittent fasting teaches discipline

Wright says intermittent fasting is effective because it taught her self control. Since the rule required her to stop eating at 8 p.m., it prevented her from snacking before bed.

“It helped me not to go into the kitchen at night and eat cake or ice cream very late in the night,” says Wright. “And I feel like that is why it works, because it teaches you discipline when it comes to what time you’re eating your food.”

When you are intermittent fasting, Wright explains, it’s easy to become obsessive about timing your meals. She says it’s important to not be too fixated on time.

“Don’t be so tedious with time if that makes sense,” says Wright. “Like, it’s okay to be a couple of minutes off — like 10, 15 minutes off. That’s okay.”

Be consistent and stay patient

The key to being successful with intermittent fasting is to be consistent and not to lose patience, advises Wright.

“I feel like consistency is key," she says. "In order for you to see [a difference] you have to be consistent.”

She says it took her many years to get to 337 lbs, so it’s important to understand that losing the weight will also take a long time. At 272 lbs, Wright’s weight loss journey isn’t over. But she says she can do things now that she wasn’t able to do before — like cross her legs when she sits and get down on the floor to play with her daughter.

She says it feels “amazing.”

“This weight loss is such a blessing, and I’m so excited to see where this journey is going to take me,” Wright says. Her goal is to lose 100 pounds by the year’s end.

How to lose weight with intermittent fasting

How it works: Intermittent fasting requires you to eat within a certain window of time and fast during the rest. There are several different methods for intermittent fasting, some of which are more restrictive than others. The 16:8 method, for example, requires you to eat within an 8-hour window and fast for 16 hours. You would only eat two meals a day, for example, your first meal starting at noon and your last around 8 p.m.

Intermittent fasting requires you to eat within a certain window of time and fast during the rest. There are several different methods for intermittent fasting, some of which are more restrictive than others. The 16:8 method, for example, requires you to eat within an 8-hour window and fast for 16 hours. You would only eat two meals a day, for example, your first meal starting at noon and your last around 8 p.m. Make sure you choose healthy foods. Eating healthy food is important when you are on an intermittent fasting diet. Make sure you are getting all the macros you need - fat, protein, and carbs, and eat nutritiously diverse meals.

Eating healthy food is important when you are on an intermittent fasting diet. Make sure you are getting all the macros you need - fat, protein, and carbs, and eat nutritiously diverse meals. Allow yourself some cheat meals. Intermittent fasting can become tedious over a long period of time. Allow yourself to have up to three cheat meals a month, but be careful not to overdo it.

Intermittent fasting can become tedious over a long period of time. Allow yourself to have up to three cheat meals a month, but be careful not to overdo it. Exercise consistently: Exercise will help boost your metabolism to lose weight. Depending on how much weight you need to lose, pick a routine that works for you.

Exercise will help boost your metabolism to lose weight. Depending on how much weight you need to lose, pick a routine that works for you. Intermittent fasting teaches discipline. Because you cannot eat once your fasting period begins, intermittent fasting will prevent you from snacking and will train you to be disciplined around food.

Because you cannot eat once your fasting period begins, intermittent fasting will prevent you from snacking and will train you to be disciplined around food. Be consistent and stay patient. If you have a lot of weight to lose, keep in mind that you will not lose it over night. Consistency and patience are key.

MORE WEIGHT-LOSS SUCCESS STORIES (AND TIPS TO BORROW)

Want more tips like these? NBC News BETTER is obsessed with finding easier, healthier and smarter ways to live. Sign up for our newsletter and follow us on Facebook, Twitter and Instagram.