www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - VibeD Rest Interface Generator

reply Mario <user1123581321 fibonacci.com> writes:
So I've been learning D since the day 11 (I posted for first time 
here) and now I've decided to try Vibe.D to make my company API.

The fact is that I've achieved to do it (according to the 
provided code) and it works! But it shows a default message and 
on the startup. So I'd like to know how can I set it to receive 
the HTTP(s) request, analyze the body and get the data through a 
database (we will probably use MongoDB).

If you can help me with this, I'd be grateful. Best regards, 
Mario :-)
Mar 02 2018
next sibling parent Johannes Loher <johannes.loher fg4f.de> writes:
On Saturday, 3 March 2018 at 02:32:11 UTC, Mario wrote:
 So I've been learning D since the day 11 (I posted for first 
 time here) and now I've decided to try Vibe.D to make my 
 company API.

 The fact is that I've achieved to do it (according to the 
 provided code) and it works! But it shows a default message and 
 on the startup. So I'd like to know how can I set it to receive 
 the HTTP(s) request, analyze the body and get the data through 
 a database (we will probably use MongoDB).

 If you can help me with this, I'd be grateful. Best regards, 
 Mario :-)
These are quite a lot of questions at once and it is difficult, to answer them all here, because they are so general. I suggest you take a look at the excelent book D Web Development (https://www.packtpub.com/web-development/d-web-development) which covers everything you asked. Be aware though that new vibe.d Versions have been released since the Book has been published and so some of its information is outdated. so if you use a recent Version of vibe.d, be sure to also Check out the documentation.
Mar 03 2018
prev sibling parent aberba <karabutaworld gmail.com> writes:
On Saturday, 3 March 2018 at 02:32:11 UTC, Mario wrote:
 So I've been learning D since the day 11 (I posted for first 
 time here) and now I've decided to try Vibe.D to make my 
 company API.

 The fact is that I've achieved to do it (according to the 
 provided code) and it works! But it shows a default message and 
 on the startup. So I'd like to know how can I set it to receive 
 the HTTP(s) request, analyze the body and get the data through 
 a database (we will probably use MongoDB).

 If you can help me with this, I'd be grateful. Best regards, 
 Mario :-)
The "examples" folder of vibe.d code on Github has demo on using HTTPS, mongodb query and many others. Check it out.
Mar 04 2018