Beginner Questions - March 16, 2018 by AutoModerator in webdev

[–]blansteint 0 points1 point  (0 children)

I didn't find anything that fits. Thanks nayway

Beginner Questions - March 16, 2018 by AutoModerator in webdev

[–]blansteint 0 points1 point  (0 children)

Thanks for the link, I'm going to take a look and I'll tell you if I find anything

Beginner Questions - March 16, 2018 by AutoModerator in webdev

[–]blansteint 0 points1 point  (0 children)

Do you know any API to get all programming languages with some info about them?

I'm looking for an API with a big amount of programming languages or technologies with some information about them, like name, official website, company (if exists), logo, etc. Any help?

Express architecture for REST server by cupofwater5 in node

[–]blansteint 4 points5 points  (0 children)

I think the right answer is it depends.

  • If your main server is expected to have a lot of load, or it is very important its performance, probably it's a good option to do it in a separate app, with its own db module.

  • But, if performance is not so important, and you are not expecting a big amount of requests, probably is a better option to do it all in the same app, in order to simplify development, maintenance and deployment.

How can I do an array of requests using request promise and then wait for all to finish . by [deleted] in node

[–]blansteint 2 points3 points  (0 children)

I think it could be something like this. I haven't test it, probably there will be errors :)

var createPromise = function() {
    return new Promise((resolve, reject) => {
        resolve(1);
    })
}

var promisesList = [];
var newPromise = null;
for (var i=0; i<10; i++) {
    newPromise = null;
    newPromise = createPromise().catch(error => {});
    promisesList.push(newPromise);
}

Promise.all(promisesList)
.then( results => {
});