Questions tagged [vibed]

vibe.d is an async i/o and web programming framework for D.

vibe.d is an async i/o and web programming framework for D. http://vibed.org/

70 questions
1
vote
1 answer

dlang vibe.d RESTful Service Performance

Thank you for your assistance. Question: Why does my REST service seem to perform so poorly using rest interfaces in dlang vibe.d when compared to creating request handlers manually? More Information: I have been prototyping a RESTful service using…
akagixxer
  • 1,767
  • 3
  • 21
  • 35
1
vote
1 answer

Possible use case of Graphical user interface integration using Vibe.d

One selling point of Vibe.d is its Support for graphical user interfaces. So far, I can't fancy a decent use case leveraging this feature and would be very pleased if someone can tell more about it. Anything related to (Twitter) Stream API for…
menjaraz
  • 7,551
  • 4
  • 41
  • 81
0
votes
0 answers

How to exit gracefully from a Vibe.d program using also a Websocket after Ctrl+C?

Adding as usual where it applies: scope (exit) { listener.stopListening(); } is not sufficient to close a vibe.d program gracefully by means of Ctrl+C when it also make use of Websocket implemented like so: routes.get("/ws",…
menjaraz
  • 7,551
  • 4
  • 41
  • 81
0
votes
0 answers

Running vibe.d on google compute cloud

Hi I am trying to run a vibe.d serve on google compute cloud. The machine instance is: Machine type n1-standard-1 CPU platform Intel Skylake Architecture x86/64 vCPUs to core ratio — Custom visible cores — Display…
Sean
  • 789
  • 6
  • 26
0
votes
1 answer

How to properly setup Vibe-d server with mysql-native

I have vibe-d program that is used as a proxy for links. I use mysql-native to connect to SQL. It works, but the service dies after 20s - 2mins on higher traffic. I didn't see any specific error besides: core.exception.AssertError. This got me…
GTO
  • 127
  • 11
0
votes
1 answer

Failing to connect to MySQL in Dlang with vibe-d and mysql-native

I have simple vibe-D program which is trying to connect to SQL: import std.stdio; import mysql; import vibe.d; void main() { MySQLPool db_pool = new MySQLPool("localhost","root","","dbname",3306); Connection db = db_pool.lockConnection(); //…
GTO
  • 127
  • 11
0
votes
0 answers

How to store MongoClient in session store

What is the best way to store client connection? It needs in order to each request didn't request authorization to mongo. When I try: auto msettings = new MongoClientSettings(); MongoClient client =…
Wusiki Jeronii
  • 159
  • 1
  • 8
0
votes
1 answer

Save a stream to file in vibe.d

I would like to save a vibe.d stream such as HTTPClientResponse.bodyReader (of type InterfaceProxy!InputStream), but also other potential vibe.d streams to a file, how do I best do that in a memory efficient way without copying all data to RAM?
WebFreak001
  • 2,415
  • 1
  • 15
  • 24
0
votes
2 answers

Multipart form data with vibe.d

I'm trying to submit a multipart form containing an image with vibe.d My code looks like this: auto f = File("image.jpg"); auto data = new char[f.size]; f.rawRead(data); string boundary = randomUUID.toString.toUpper(); string h…
0
votes
1 answer

Vibe.d REST Interface serve image

Sending a bunch of binary back to the user like an image: interface API { @path("/data/image") @contentType("image/png") ubyte[] getImagePreview(string foo); } The function is returning a Json array with the values of the ubyte[] Here are the…
Qurashi
  • 1,449
  • 16
  • 27
0
votes
1 answer

Vibe.d basic form validation

I have a post create method: void gönderiyiOluştur(HTTPServerRequest istek, HTTPServerResponse yanıt) { render!("gönderiler/oluştur.dt")(yanıt); } and a post store method like this: void gönderiyiKaydet(HTTPServerRequest istek,…
user762630
0
votes
1 answer

Sql query can not handle quotation marks

I try to achieve a small blog application using vibe.d. I have a form in this adress http://localhost:8888/gönderiler/oluştur User inputs post title and body. Than these information are stored in a database. Until now so far so good. Let's say the…
user762630
0
votes
1 answer

Pug (Jade) base HTML Page: Cannot find element: #app

I use vibed server. It use Pug preprocessor (before known as Jade). Here is my page code: doctype html html head script(src="https://unpkg.com/vue") script(src="app.js") title Hello, World body h1 Hello World …
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
0
votes
1 answer

Vibe.D - undefinded identifier (Dlang)

I'm trying to create simple REST api, but when i try to compile my code im getting frontpage.d(15,3): Error: undefined identifier 'tmp', did you mean alias 'cmp'? Here is my code: module service.frontpage; import…
user3069488
  • 75
  • 1
  • 6
0
votes
1 answer

HTTPS on Vibe.d

On my linode box I installed the Let's Encrypt SSL certs and created a bare-bones Vibe.d app to test my SSL connection. I always timeout. Here is the code: import vibe.vibe; void main() { auto settings = new HTTPServerSettings; …