Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 17 15:02
    andreaslacza closed #78
  • Mar 19 08:51
    cutejs commented #78
  • Jan 10 15:37
    josephtveter commented #77
  • Oct 15 2018 07:34
    frank-dspeed commented #78
  • Mar 03 2018 02:52
    andreaslacza opened #78
  • Jan 12 2018 02:03
    grantcarthew commented #77
  • Jan 11 2018 20:48
    oscarr-reyes commented #77
  • Jan 11 2018 17:27
    xeno opened #77
  • Oct 21 2017 07:02
    oscarr-reyes opened #76
  • Oct 21 2017 06:30
    oscarr-reyes closed #62
  • Sep 13 2017 17:32
    jaygoodfellow opened #75
  • Jun 19 2017 07:44
    frank-dspeed commented #32
  • Jun 18 2017 21:08
    Nosthertus commented #32
  • May 04 2017 22:49

    adamhalasz on v0.16.0

    (compare)

  • May 04 2017 22:47

    adamhalasz on master

    v0.16.0 - Bug Fix: In error.js… (compare)

  • Apr 08 2017 06:48
    Nosthertus opened #74
  • Mar 25 2017 01:42
    Nosthertus commented #68
  • Mar 24 2017 21:09
    Nosthertus synchronize #62
  • Mar 23 2017 06:46
    Nosthertus commented #68
  • Mar 07 2017 16:04
    adamhalasz closed #73
Oscar Reyes
@oscarr-reyes
@adamhalasz one last thing, i was checking on the conflicts that diet-static has from my pull-request, but GitHub says that only those with write access can merge and i cannot see what is making the conflict
Rudraksh MK
@rudimk
@adamhalasz hey! i just noticed there was a chatroom, so i thought i'd come here too
i filed #55 today. was wondering if anyone else here has faced the same issue?
also, i love diet! i've never seen another framework that's just so clean and easy to get started with, especially for someone who isn't very comfortable with javascript!
Oscar Reyes
@oscarr-reyes
@adamhalasz I have just developed a diet module for static files using streaming objects, you can find the rep in here
Adam Halasz
@adamhalasz
@rudimk welcome! Thank you for your kind words it means a lot! I hope I can help you resolve your issue next week.
@Nosthertus hey hey hey really good job :+1: It would be very interesting to see a benchmark to show the performance difference between diet-static-stream and diet-static.
Oscar Reyes
@oscarr-reyes

hey @adamhalasz , you will be glad to hear that Diet.js will be presented in an IT conference at my place, my partner and i will be explaining all the functions that Diet.js has along with diet-raml-generator as design for building Restful API, if i manage to make enough fixes and improvements to diet-raml-generator this might take place in 3 weeks, we both would like to add some feature requests as well as working with fixes we have found on the building of diet-raml-generator

Also i've been studying the tools you recommended to me and i have made small tests to have a final benchmark results comparison with diet-static and diet-static-stream.. all i can tell for now is that both modules have almost the same benchmark timing when it comes to small files, like HTML, but when bigger files are requested (files like mp3, or mp4) that containst bigger data between 4mb - 100mb file size, diet-static-stream responds way much faster than diet-static.. i hope i can publish the results this week

Adam Halasz
@adamhalasz
hey @Nosthertus that sounds fantastic!
Adam Halasz
@adamhalasz
Awesome job man! Can you send me a link to the IT Conference?
Yeah I was expecting similar results with diet-static-stream :+1: really cool benchmarks man
Oscar Reyes
@oscarr-reyes
Thanks @adamhalasz , I have saved a gist that contains the results in a JSON file here
garylogin
@garylogin

Hi is it possibe to host 2 sites both https I have tried this code but it doesn't work var server = require('diet')
var fs = require('fs');

var app1 = server()

var sslPath1 = '/etc/letsencrypt/live/myapp1.com/';

app1.listen('https://myapp1.com', {
key: fs.readFileSync(sslPath1 + 'privkey.pem'),
cert: fs.readFileSync(sslPath1 + 'fullchain.pem')
})

app1.get('/', function($){
$.end('welcome to myapp1')
})

var app2 = server()

var sslPath2 = '/etc/letsencrypt/live/myapp2.xyz/';

app2.listen('https://myapp2.xyz', {
key: fs.readFileSync(sslPath2 + 'privkey.pem'),
cert: fs.readFileSync(sslPath2 + 'fullchain.pem')
})

app2.get('/', function($){
$.end('welcome to myapp2')
})

Adam Halasz
@adamhalasz
@garylogin it should be possible. I will try your code soon and tell you more. In the meantime do you get any errors or messages?
garylogin
@garylogin
So running the server I get Diet (0.10.8), http://dietjs.com/ ...https server is listening on https://myapp1.com browsing to this website works with no error, however browsing to the 2nd site I get this error Error code: SSL_ERROR_BAD_CERT_DOMAIN if i remove myapp1 from the script and run the server as myapp2 there is no issue with the cert
Frank Lemanschik
@frank-dspeed
sorry that i responded so slow
i think it cant work because we aka DietJS have not SNI Support and all that integrated :D
constants.SSL_OP_NO_SSLv2,
SNICallback: function(servername, cb) {
var certificates = {
"foo.com": ["fookey.pem", "foocert.pem"],
"bar.com": ["barkey.pem", "barcert.pem"]
};
is the parts that we would need to extend for example
Dr Wicked
@drwicked
Does anyone have any leads on integrating passport.js with diet?
Frank Lemanschik
@frank-dspeed
yes i have leads with that without problem
if you wanna make it easy use on your passport routes the original objects like
Frank Lemanschik
@frank-dspeed
function()($.request, $.response) are the original once only for your understanding
in passport you only need $.request
so you do a dietjs function that takes $ signal run async passport.init and the other middelware with ($.request, $.response) when that is finished you take the req object from passort and attach the auth status if exist to the signal $.isAuthencicated = req.isAuthencicated and then next dietjs middelware
Frank Lemanschik
@frank-dspeed
or simply use my Express Middelware Module
it makes 100% compatiblity between Diet.JS and all other framework that use req, res,next
Oscar Reyes
@oscarr-reyes
Greetings
I just published a diet module for CORS response handling, the module can automatically detect all registrered methods on the requested route and send CORS data in Header
Frank Lemanschik
@frank-dspeed
@Nosthertus couldn't we do that via set header befor?
i think cors is something realy individual
justin kadima
@justinkadima
support for ejs template engine:
Luis Vinicius
@luisvinicius167
hey guys! Group Routes available -> https://github.com/luisvinicius167/diet-group-router
Matt McFarland
@MattMcFarland
why???
why was this made? i cant see any difference from express/koa/hapi, etc, etc ,etc
Oscar Reyes
@oscarr-reyes
@MattMcFarland same reason as why there is a go language if there is java or c#, from my point of view i find diet easier and faster than express, koa, hapi
Matt McFarland
@MattMcFarland
@Nosthertus Ok, can you elaborate on why you find it easier and faster than express/koa/hapi ? Specifically, what problems did you run into when using those and what does this do better? I have currently moved to using merry, which is more light weight and lower level (as I prefer to be closer to the metal myself) but I was wondering what differences diet has compared to the other things out there, what sets it apart from the others?
Oscar Reyes
@oscarr-reyes
@MattMcFarland It's been almost 2 years since i started using diet, in that moment i was looking for frameworks that would make REST services and in that time (i don't remember which express version was back then) i did try expressand hapi, but it turned out to be a little hard to understand, with so little documentation explanation on the methods, many times i tried to fully understand them before i would commit myself to use express or hapi, so after some research i found diet and the docs were easy and complete, it took me so little time to take the decision to commit into diet
i find diet faster than express and hapi because it executes lesser code than them and therefore it gave faster response to all requests, i also find it better because diet separates the requests on 3 middleware stages which are (header, route/response, footer), i know express and hapi use this kind of middleware with the method use but that doesn't tell much what it is actually doing, and also diet is very modular that it makes easy to create custom modules which so far it has been really useful
Oscar Reyes
@oscarr-reyes
i know diet still has some improvements to work on, but yet in the state where it is (even when i started using diet), it has been really useful for all the work i have done
Frank Lemanschik
@frank-dspeed
@Nosthertus what is the most usefull feature?
the Signal=?
Oscar Reyes
@oscarr-reyes
@frank-dspeed Yes, i believe the signal is the most useful feature, it contains the request and response methods, and also can contain new properties defined within the middleware
Frank Lemanschik
@frank-dspeed
cool
you will be happy to hear that we have done that also in express
function (req,res,next) can be written function ($,res,next) or only $ as well
we attache now also the original req response objects to req
:D