https://ift.tt/2KjTUKV
Submitted July 01, 2018 at 06:56AM by hezedu
Saturday, 30 June 2018
Returning the result of a promise loop up one function.
I'm new to promises and working on my first project using them. I have following code ; firstpromise.then(function(result) { //console.log(result); return secondPromise(result); }).catch(function(result){ //console.log(result) }).then(function(result) { //console.log(result); return exportname.iteratePromises(result); }).catch(function(result){ //console.log(result) }); exports.iteratePromises= function (object) { new Promise(function (resolve, reject) { for (var i = 0; i < object.array.length; i++) { doNewPromise(object.array[i], object) if (i + 1 == object.array.length) { resolve(object); } } } function doNewPromise(args, object) { // is a method in the thirdPromise export file new Promise(function (resolve, reject) { request(headerOptions(args), function (error, response, body) { if (!error && response.statusCode == 200) { var result = JSON.parse(body); doStuff(); } console.log(object); resolve(object); }); }); }; So at the stage of iteratePromises I'm calling the for-loop which in itself does a request to an API for each element in the array. That request does something with the object successfully.If I console.log the doNewPromise before resolving it, it returns all data that is expected for each iteration within the array and the object is manipulated successfully.The problem I'm facing now is that I don't know how to pass that object (the one in the for-loop) back to the promise chain once all iterations have been finished.In short, how should I store/declare the returned promises from the iteratePromises execution back to the promise chain?I have tried to end the loop by usingif(i == arr.length){ end and resolve } but that keeps on returning undefined objects.I'm really at a loss as to how to approach this and any help is very much appreciated .Thank you in advance,Hexerin0
Submitted July 01, 2018 at 12:14AM by hexerin0
Submitted July 01, 2018 at 12:14AM by hexerin0
[question] how to call a slow process
More specifically I'm making a file uploader for a mate of mine and naturally I need to scan the files that gets uploaded. Now he has something called sophos to do so, and it works with this command/opt/sophos-av/bin/savscan -nc -nb -ss -remove -p=$transpdir/last_scan.txt -archive -suspicious *file*Which I've tested and it works (I even know the exit status for virus found and clean file (3 and 0 respectively)) but the problem I have is it takes a few seconds for the the command to work. Now I'm considering calling the command herehttps://github.com/inabahare/lewd2/blob/master/src/Routes/upload.js#L87but I'm not really sure how I would go about it
Submitted June 30, 2018 at 11:29PM by inabahare
Submitted June 30, 2018 at 11:29PM by inabahare
Fractal — Nodejs app structure
https://ift.tt/2Kz8dY6
Submitted June 30, 2018 at 06:47PM by denomer12
Submitted June 30, 2018 at 06:47PM by denomer12
Debugging Node Code in VS Code
https://ift.tt/2KkzzUP
Submitted June 30, 2018 at 06:48PM by ICYMI_email
Submitted June 30, 2018 at 06:48PM by ICYMI_email
Where i can learn NodeJS from scratch?
I've worked in angular but i don't have any idea about Node. Is there any online tutorial free/paid to learn Node from scratch?!
Submitted June 30, 2018 at 07:03PM by palani_kjs
Submitted June 30, 2018 at 07:03PM by palani_kjs
Get a beautiful gradient from image - see demo
https://ift.tt/2yWtDNk
Submitted June 30, 2018 at 05:56PM by GarasiaKartik
Submitted June 30, 2018 at 05:56PM by GarasiaKartik
Lightship – Abstracts readiness/ liveness checks and graceful shutdown of Node.js services running in Kubernetes.
https://ift.tt/2KwP7VM
Submitted June 30, 2018 at 04:33PM by gajus0
Submitted June 30, 2018 at 04:33PM by gajus0
Generate beautiful gradient from image - this is my first npm module
https://ift.tt/2yUMlVR
Submitted June 30, 2018 at 03:59PM by GarasiaKartik
Submitted June 30, 2018 at 03:59PM by GarasiaKartik
NodeJs instead of Django / Spring??
My goal is to be able to launch web apps that are scalable using DRY principles with good libraries to use. I know Django, Spring, Java Python (amongst other things)DjangoI've used Django to launch my own web-apps before on a PaaSI'm familiar with the architecture (MTV) and love how it handles a lot of the things for meI'm not as familiar with Python as I should be (classes etc). I'd need to take a refresher course before I begin focusing further on DjangoSpringNever used Spring or Java for web developmentGood knowledge of Java / OOP design principles (2 semesters at college + self-study)Stronger foundation in Java makes me more confident to learn SpringWhat I am not sure ofIf it's even worth it learning spring when I already know DjangoIf Django / Spring have any high-level limitations or specific benefits / use casesWhether any of these will be harder in terms of difficulty but also AWS integration (I'm working on an AWS project at work and learning AWS along the way)But then I flirted with the idea of Node.JS and going full-stack JavaScript. I've worked with JS before, and the benefit is that it operates with HTML5/CSS quite nicely, which means it is easier for me to keep my HTML/CSS skills sharp. It simplifies my study plan greatly. I'd love for the idea to specialise in one thing (Right now I'm a generalist jack of all trades).Are there any downsides associated with full-stack JavaScript?*My interest is not in being a programmer or a career or whatever, I work in cybersecurity, I simply want to have an idea and want to be able to implement it to the best of my capability. That is all :-) *
Submitted June 30, 2018 at 12:57PM by idigress1337
Submitted June 30, 2018 at 12:57PM by idigress1337
AdminPanel for NodeJS with Express/Mongoose
Soon we will release our administration panel. This admin panel works with mongodb/mongoose, supports text-rich editor CkEditor, has relations, multi-selector, upload files and images. You can create admin_users and set roles. Create and use mongoose-schema for your models. We called our adminPanel - Froncubator-Bridge. Stay tuned...by froncubator.prohttps://github.com/froncubatorhttps://i.redd.it/stp2s1d7p3711.pnghttps://i.redd.it/hmdxdu9cp3711.pnghttps://i.redd.it/vn5dom41p3711.png
Submitted June 30, 2018 at 09:44AM by philsitumorang
Submitted June 30, 2018 at 09:44AM by philsitumorang
Appropriate way to store files? (Rest, API, SQL)
Hey,I'm developing a REST API which accesses another API (for the sake of simplicity I will refer to it as the 'remote API') to retrieve data and store it into a database. In this context the data represents a file, which is represented as an byte array: the remote API is written in Java, where it parses a file into a byte array and serves the byte array as the response to the GET request of the REST API. The current implementation looks like this:REST API makes a GET request for a specific file.Remote API receives and parses the query (where it finds information about the desired file).Remote API parses the requested file as a byte array.Remote API sends the byte array as a response back to the REST API.REST API receives the response.REST API stores the byte array into my postgreSQL db.Later on the REST API should serve the stored data (decoded) to my frontend, written with react.js.Each file is around 5MB and represents ~ 5'000'000 characters. Given the above implementation, accessing a single stored file takes around 3 seconds. The response looks like this:{"data": [{ "id":1, "name":"file0", "content":{ "type":"Buffer", "data":"Content of the file..." }, "createdAt":"2018-06-29T10:17:17.829Z", "updatedAt":"2018-06-29T10:17:17.829Z" }] } Based on this, I have a few questions:What is the standard in the industry to store files?Where do you prefer storing files (refer to the question below)?Is it bad practice to store 5MB files into a single column in a db (currently I'm storing the content of into a single column for each file, of type bytea)Also, I believe the read process of a stored file takes no time, however the display of the files content does. I tried returning only the content of the stored file, without any other information (non-JSON), which lead to Chrome starting to download automatically the returned data (as you would download anything). This happened immediately, that's why I believe, the retrieving from the db isn't an issue.Am I wrong on this?Given that I would return the content, without any other information as shown above, how would I access the returned data on my front end (e.g. to display it in a table)? (since I'm not returning JSON, how would I access the data?)If you have any other suggestions, I would appreciate your help :)
Submitted June 30, 2018 at 12:00PM by Fasyx
Submitted June 30, 2018 at 12:00PM by Fasyx
Friday, 29 June 2018
xvideos Node.js API lib
https://ift.tt/2KBzybZ
Submitted June 30, 2018 at 04:55AM by rodrigogs
Submitted June 30, 2018 at 04:55AM by rodrigogs
Run functions in order only after previous has finished
Is it possible to run functions in order but only execute after the previous function has completed?I would like the output to be 1 2 3 4 but I get 1 2 4 3.async function foo() { await step1(); await step2(); await step3(); await step4(); } function step1(){ console.log("1"); } function step2(){ console.log("2"); } function step3(){ setTimeout(function () { console.log('3'); }, 1000) } function step4(){ console.log("4"); } foo();
Submitted June 30, 2018 at 04:00AM by scoboose
Submitted June 30, 2018 at 04:00AM by scoboose
What kind of tutorials do you want?
I've made several websites and a multiplayer game : )What would you like to see for myself & others to create?
Submitted June 29, 2018 at 10:14PM by ant_eater_paradise
Submitted June 29, 2018 at 10:14PM by ant_eater_paradise
Full Stack Javascript Developer (Node/React) at Farewill
https://ift.tt/2Kwdb80
Submitted June 29, 2018 at 06:19PM by ICYMI_email
Submitted June 29, 2018 at 06:19PM by ICYMI_email
Common Node.js Attack Vectors: SQL Injection
https://ift.tt/2MzlhNI
Submitted June 29, 2018 at 05:45PM by nucleocide
Submitted June 29, 2018 at 05:45PM by nucleocide
Client/Server Node Implementation
Hello all,I am fairly new to Node and web development in general, so I'm still learning this framework among others and how to structure a project directory. I am currently developing a personal project that implements Node for the back-end and Vue for the front-end. My project's current directory is simply structured as such:> App--> Client (Vue)--> Server (Node)My question: Should I npm init in both the Client and Server folders to have each end of the project use their own node_modules or should I npm init in the parent directory to have them share a common node_modules folder?I plan to host my project on Heroku and from what I understand you have to host the front-end and back-end as separate "apps", where the front-end calls the back-end for data. So this makes me think that you would need separate node_modules.
Submitted June 29, 2018 at 03:54PM by josecramirez
Submitted June 29, 2018 at 03:54PM by josecramirez
Creating a HTTP request driven dashboard
Hi guys,I'm looking to create a sort of "Dashboard" driven by HTTP requests. For example, if you were to POST to /timer with details of a timer you wanted to create it would create a timer on a webpage and countdown from that timer.What would be the best way of doing this? Are any web frameworks particularly good at this type of thing?
Submitted June 29, 2018 at 03:01PM by 23MPK
Submitted June 29, 2018 at 03:01PM by 23MPK
Unit-Testing Sequelize Models Made Easy
https://ift.tt/2tDMLuy
Submitted June 29, 2018 at 12:55PM by kiarash-irandoust
Submitted June 29, 2018 at 12:55PM by kiarash-irandoust
What is easiest way to build Shopping Cart with basic understanding of nodeJS and mongoDB?
...
Submitted June 29, 2018 at 11:02AM by ExplicitGG
Submitted June 29, 2018 at 11:02AM by ExplicitGG
[HELP] Cannot read property '...' of undefined
Hi!My application is being built with the MERN stack and I am using Redux, however, there's a problem: I cannot add an object to the database. In Redux action the object can be successfully printed, however, in the API call, the req is undefined.ModelAction, here console.log(cpuData) successfully prints the correct object.ReducerAPI
Submitted June 29, 2018 at 12:29PM by Just42s
Submitted June 29, 2018 at 12:29PM by Just42s
nbx – Execute package binaries
https://ift.tt/2KhcP8Z
Submitted June 29, 2018 at 10:15AM by dpswt
Submitted June 29, 2018 at 10:15AM by dpswt
Career advice needed, should i start my web development career with full stack JS?
I am still studying and have 2 internships on my belt, one in PHP and one in Python. But i want to start doing some freelancing because i have a lot of spare time and i think full stack JavaScript is perfect for that.But what is wisdom?Would full stack JS be a good choice? How might companies think about that?Or should i choose a language such as PHP, Python or Java as well?Thanks in advance!
Submitted June 29, 2018 at 08:25AM by bb7770h16
Submitted June 29, 2018 at 08:25AM by bb7770h16
Thursday, 28 June 2018
How much AWS do you guys know?
I was wondering, on a day to day job as a node developer (perhaps full stack also with some front end technology) how much AWS do you encounter?I’ve been doing NodeJS for almost two years some years ago and then switched to a React Native job and haven’t had much to do with node since then. Looking to go back to it again and I see more and more of AWS in job requirements.And if you are proficient in AWS, how did you do it? Are their courses well worth it?
Submitted June 28, 2018 at 06:55PM by kdesign
Submitted June 28, 2018 at 06:55PM by kdesign
[HELP] Is it possible to append additional data? (Express and Mongoose)
Hi!Is it possible to add a few Game objects inside MongoDB with name and description only and later append dataset objects to a specific game via api /game/:id?Sincerely thank you for any help!Game model
Submitted June 28, 2018 at 05:27PM by Just42s
Submitted June 28, 2018 at 05:27PM by Just42s
Point of worker threads in an async js world?
Perhaps I am too used to doing the traditional way with the event loop and async JavaScript but what will these emerging features give us node users? Will each thread still work with same logic of event loop?
Submitted June 28, 2018 at 04:12PM by christodagama
Submitted June 28, 2018 at 04:12PM by christodagama
Running Node with HTTPS vs running behind a server like nginx running HTTPS?
I'm working on a toy application but want to try to make it as real-world as possible. As part of this I'd like the app to be served over HTTPS.My question is, what is usually done? Configure the Node server to serve over HTTPS, or leave it as HTTP and put it behind like an nginx server which is configured for HTTPS?
Submitted June 28, 2018 at 04:32PM by thinksInCode
Submitted June 28, 2018 at 04:32PM by thinksInCode
Multiple get requests
Hi people,I need some help... In the project I'm working on, I make multiple http get requests at the same time. Some of them request data from the same endpoint, but with different id number in the url, eg. getData/2 and getData/4.If I make multiple requests at the same time, but they use different endpoints, everything is okay, eg. getDataA/1 and getDataB/2.When 2 or more requests go to the same endpoint eg. getDataA/1 and getDataA/2, I'm getting following error:{ Error: read ECONNRESETat _errnoException (util.js:1022:11)at Pipe.onread (net.js:628:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }Any ideas?:(
Submitted June 28, 2018 at 04:40PM by lip3k
Submitted June 28, 2018 at 04:40PM by lip3k
Enum ordering in Sequelize/Postgres
Hello! I've been using Sequelize to work with a Postgres DB for the last few weeks and it has been working fine so far. The current problem I'm facing is that apparently Sequelize doesn't allow ordering your result by an ENUM field.I have a table in my DB with an ENUM field defined with this array: [campaign.APPROVED, campaign.WAITING_APPROVAL, campaign.REJECTED];And I'd like to get a list of all my campaigns and I want the order to be approved, rejected, waiting for approval. Unfortunately Sequelize is not capable of this and I haven't found a direct way of doing with raw queries. Am I missing something with Sequelize or going with raw queries is my only option? If so could someone help me out with how I can achieve it?
Submitted June 28, 2018 at 03:46PM by SeraphineX93
Submitted June 28, 2018 at 03:46PM by SeraphineX93
If I use next.js (or other SSR) will I still need a node.js server for authentication or api related things?
I'm not sure if I'm understand this properly, I have only recently started to wrap my head around react, node etc. It would be great if somebody could explain this to me. If I am using next.js, could I have all my server calls *on that very server*?And then, of course, just because i *could* doesn't mean that I should. So even if I *could*, - should I?If I misunderstand something very badly, please do let me know!
Submitted June 28, 2018 at 03:05PM by jupytermars
Submitted June 28, 2018 at 03:05PM by jupytermars
decoding array of utf8 strings inside a stream Ask Question
I faced a weird problem today after trying to decode a utf8 formatted string. It's being fetched through stream as an array of strings but formatted in utf8 somehow (I'm using fast-csv). However as you can see in the console if I log it directly it shows the correct version but when it's inside an object literal it's back to utf8 encoded version. var stream = fs .createReadStream(__dirname + '/my.csv') .pipe(csv({ ignoreEmpty: true })) .on('data', data => { console.log(data[0]) // prints farren@rogers.com console.log({ firstName: data[0] }) // prints { firstName: '\u0000f\u0000a\u0000r\u0000r\u0000e\u0000n\u0000@\u0000r\u0000o\u0000g\u0000e\u0000r\u0000s\u0000.\u0000c\u0000o\u0000m\u0000' } }) Any solution or explanations are appreciated.Edit: even after decoding using utf8.js and then pass it in the object literal, I still encounter the same problem.
Submitted June 28, 2018 at 03:09PM by sourcesoft
Submitted June 28, 2018 at 03:09PM by sourcesoft
What are some good markdown documentation tools for static websites?
I am working on an open source project and i would like to use some documentation tool (not the github wiki) to generate documentation preferably in markdown and use it on a static website. Anyone know any cool ones? :)
Submitted June 28, 2018 at 01:41PM by pitops
Submitted June 28, 2018 at 01:41PM by pitops
Building REST services with Serverless framework, in Node.js, AWS Lambda and DynamoDB
https://ift.tt/2xWyMVa
Submitted June 28, 2018 at 01:41PM by ginger-julia
Submitted June 28, 2018 at 01:41PM by ginger-julia
If Node.js lets you cruise: Azure is your board. NO IT`S NOT. NODE.JS IS YOUR BOARD
https://ift.tt/2N3cggW
Submitted June 28, 2018 at 11:55AM by aivaonair
Submitted June 28, 2018 at 11:55AM by aivaonair
If Node.js lets you cruise: Azure is your board. NO IT`S NOT. NODE.JS IS YOUR BOARD.
https://ift.tt/2ySi8GI
Submitted June 28, 2018 at 12:03PM by aivaonair
Submitted June 28, 2018 at 12:03PM by aivaonair
Primary ID and Public ID SQL Databases Node.js
I'm still quite new and I have some questions regarding security. For my api endpoints I dont want to use primary id key for security reasons, yeah or no? If yes then I need to automatically set a public id so the api endpoints like /users/:id will be the public id and not smth like 4 or 9. What type should I use for it thats efficient and doesnt slow down the CRUD operations to my Postgres database. Thanks in advance
Submitted June 28, 2018 at 12:24PM by rizlah5
Submitted June 28, 2018 at 12:24PM by rizlah5
Node app on Nginx is downloading the index.html instead of updating it, how to fix?
https://ift.tt/2KghXdF
Submitted June 28, 2018 at 09:09AM by flaques
Submitted June 28, 2018 at 09:09AM by flaques
NodeJS MS-SQL integration testing with Docker/Mocha
https://ift.tt/2Kh0W36
Submitted June 28, 2018 at 08:41AM by Fewthp
Submitted June 28, 2018 at 08:41AM by Fewthp
Question from a guy coming from a hobby background. What is a development/production environment?
Hey r/node, I've used node for about a year now and I've only made stuff as the need came, with some occasional practice projects (link shortener, crud etc).Ive used react (create-react-app. Never have set it up myself), redis, express, node (duh) and jade.I've noticed that in react, I can have it proxy to an API server during dev, but as soon as I deploy, I have to re-type the URLs to match my actual server, and the spiel goes on.What do the pros do when it comes to this?
Submitted June 28, 2018 at 08:45AM by kishichi
Submitted June 28, 2018 at 08:45AM by kishichi
How true is It that NodeJS currently Supports Threading
From What I saw on Twitter, a NodeJs user posted that NodeJs currently supports threading, please I want to verify how sure is this...
Submitted June 28, 2018 at 08:07AM by idevosm
Submitted June 28, 2018 at 08:07AM by idevosm
Wednesday, 27 June 2018
Why Node.Js Is So Popular Amongst Developers? | Plow
https://ift.tt/2MuJwg5
Submitted June 27, 2018 at 06:25PM by ICYMI_email
Submitted June 27, 2018 at 06:25PM by ICYMI_email
The Forge: A Node CLI that spins up and hosts Progressive Web Apps
https://forgepwa.com
Submitted June 27, 2018 at 06:34PM by heyiamjk
Submitted June 27, 2018 at 06:34PM by heyiamjk
[help] Routing front-end and back-end through the same port
I followed this tutorial to create a Vue front-end and an Express back-end. Everything works in development, but I don't want to have them on different ports. Should I do this by routing the index.html of the client through the root of the Express backend? Or is there a better way?Here's the code if you want to have a look yourself.
Submitted June 27, 2018 at 06:02PM by leo2a4
Submitted June 27, 2018 at 06:02PM by leo2a4
Feedback on library project
Hi everyone! I've been working for the past couple weeks on a small active record implementation in typescript, and would love some feedback. I'm not really looking for people to be looking at the code, but if anyone could briefly look at the docs and give any feedback, that would be much appreciated! Any feedback is welcome, more if it is honest and even negative. I want to hear everything. Thanks!The repo: https://ift.tt/2tB0ked Docs: https://ift.tt/2KrvmvB
Submitted June 27, 2018 at 05:26PM by wolfepvck
Submitted June 27, 2018 at 05:26PM by wolfepvck
[Question] Long running job in microservices architecture
Hi !I'm currently working on a project and I use Baobab as a data tree structure, to store the state of my "overlord" job, and get events when I add data to it, to reschedule jobs for workers.https://ift.tt/2Iwmrai want to send tasks to workers in docker containers/worker pool, and get the results back from them by getting a POST request back with the data.Is there any solution to keep that data tree and its event watchers while waiting ? Keeping the trees in a global state and accessing them when I get the POST back ?
Submitted June 27, 2018 at 05:29PM by gbysec
Submitted June 27, 2018 at 05:29PM by gbysec
The do’s and don’ts in using Node.js to build APIs
https://ift.tt/2tzFQCI
Submitted June 27, 2018 at 04:52PM by CrankyBear
Submitted June 27, 2018 at 04:52PM by CrankyBear
Just-API, for API testing
https://ift.tt/2JOaMFj
Submitted June 27, 2018 at 02:31PM by thatdaythisday
Submitted June 27, 2018 at 02:31PM by thatdaythisday
sessions over multiple express applications
For school i'm working on a project that involves three React clients and an api. Now i want to use react server rendering in combination with redux. I want to retrieve the active quiz from a user and store the information in the redux store on forhand. The react clients will be using express for server rendering. But is there a way to use the session stored by the api to retrieve the active quiz? I'm using express-session on the api that stores the session in mongodb.
Submitted June 27, 2018 at 01:58PM by scarstensinke
Submitted June 27, 2018 at 01:58PM by scarstensinke
File System file writing
I need some help figuring out how to add data to a .json file using fs without 1) overwriting the file or 2) simply appending. For example:restaurants.json{"restaurants":[{"Name":"Mama's Pizza"}]} I need to be able to write to this file and update the restaurants' array while preserving the current data. Now the user has submitted another restaurant and the output should look as such,{"restaurants":[{"Name":"Mama's Pizza"}, {"Name":"Papa's BBQ"}]} Any and all help pointing me in the right direction would be appreciated! thanks!
Submitted June 27, 2018 at 02:03PM by mindful_code
Submitted June 27, 2018 at 02:03PM by mindful_code
Any good tutorial for learning how to use REST APIs with node?
Basically I want to get familiar with node.js and I want to create a module that is able to pull orders from my Shopify-based store and fulfill the orders by sending the customer their coupon code via email. Basically I want to pull orders from shopify, email the customer their product, then mark the order as fulfilled. But to do that I would have to get familiar with REST APIs, is there any guides or books you guys would recommend? Thanks in advance!
Submitted June 27, 2018 at 10:54AM by col0ringbook
Submitted June 27, 2018 at 10:54AM by col0ringbook
End-to-end testing Single Page Apps and Node.js APIs with Cucumber.js and Puppeteer
https://ift.tt/2JNeEdQ
Submitted June 27, 2018 at 10:07AM by harlampi
Submitted June 27, 2018 at 10:07AM by harlampi
Tuesday, 26 June 2018
IssueHunt
https://ift.tt/2tDn78z
Submitted June 26, 2018 at 06:34PM by ICYMI_email
Submitted June 26, 2018 at 06:34PM by ICYMI_email
Node.js vs Ruby on Rails
Hello, I need some opinions referent to the advantage of using node against rails on web application. Why choose node. Is it better than rails nowadays? Any arguments?
Submitted June 26, 2018 at 06:47PM by dazwok
Submitted June 26, 2018 at 06:47PM by dazwok
best module for headless browser in mobile
hello all i hope that you having a good day,I want to headless a website and show some information after sign in and go browse in it in mobile (ios and android) and i want to know what is the best module in node or anything else for headless browser, the website popup some pages that i have to track help me and thank you all
Submitted June 26, 2018 at 05:58PM by saad20006
Submitted June 26, 2018 at 05:58PM by saad20006
Any fork of amqp.node?
Hi there,Since it seems that amqp.node is sparsely maintained (last updated on November 2017) I wonder if the community has come up with a fork or if you use amqp or rabbitmq with Node.js I'd like to know what lib you're using.Thanks.
Submitted June 26, 2018 at 05:26PM by vcamargo
Submitted June 26, 2018 at 05:26PM by vcamargo
Solving the Node require() path problem for once and for all
https://ift.tt/2yJWTXI
Submitted June 26, 2018 at 03:29PM by DanHulton
Submitted June 26, 2018 at 03:29PM by DanHulton
What is mocha used for?
Hi, i know that mocha is used for test but i was just wondering why people even use it? I once watched a tutorial on mocha when a guy saved data to the DB. I just can't understand why he used mocha if he could just check whether the saved data really is in the DB. I know I am probably wrong about mocha but I just can't understand it's uses. Could someone please explain it to me? Thanks in advance ;)
Submitted June 26, 2018 at 03:32PM by everek123
Submitted June 26, 2018 at 03:32PM by everek123
How to import/export ES6 modules in Node
https://ift.tt/2KocGN2
Submitted June 26, 2018 at 03:59PM by saranshk
Submitted June 26, 2018 at 03:59PM by saranshk
lev2: A CLI and a REPL for managing LevelDB instances
https://ift.tt/2tFwHYh
Submitted June 26, 2018 at 02:07PM by maxlath
Submitted June 26, 2018 at 02:07PM by maxlath
Advice on a simple Node backend
I'm attempting to build a Lunchbox application for one of the monitors at my place of work. I am mostly a front-end dev working with React and Redux but I've dabbled in some Node backend work. I'm looking for advice on how I would setup a db for an application that saves data for local restaurants to suggest when we want to go out for lunch. I want this to be as simple as possible so if anyone has done something similar to this and could help me plan out the db I'd be really happy. Thanks for the help in advance!EDIT: maybe I don't even need a backend, I'm planning on running this on a rasp pi so maybe I could just have a text file with all the restaurants indexed in it and pull from that.
Submitted June 26, 2018 at 02:13PM by mindful_code
Submitted June 26, 2018 at 02:13PM by mindful_code
Functional Programming Unit Testing in Node - Part 2: Predicates, Async, and Unsafe
https://ift.tt/2yFcsjg
Submitted June 26, 2018 at 01:30PM by moranjavascriptworks
Submitted June 26, 2018 at 01:30PM by moranjavascriptworks
TOp 6 Features Node.js
https://ift.tt/2tvV8Za
Submitted June 26, 2018 at 12:33PM by MetaDesignSolution
Submitted June 26, 2018 at 12:33PM by MetaDesignSolution
A Better Sails.js
https://ift.tt/2KnqLu8
Submitted June 26, 2018 at 11:39AM by tknew
Submitted June 26, 2018 at 11:39AM by tknew
Handling back-pressure on DB
Say your relational DB is slower than the input stream - it can't cope with the number of inserts and get exhausted. No need to save data in real-time - system can tolerate latency.How would handle this: looking for patterns, frameworks and products
Submitted June 26, 2018 at 12:35PM by yonatannn
Submitted June 26, 2018 at 12:35PM by yonatannn
Testing best practices
Starting my first Node testing project (Mocha+Chai), read many docs but as a beginner I'm probably going to make big mistakes. Can you help me prevent those and share some good practices?
Submitted June 26, 2018 at 12:40PM by mulijordan1976
Submitted June 26, 2018 at 12:40PM by mulijordan1976
Pokeslack IS A SLACKBOT THAT ANSWERS ALL YOUR QUESTIONS RELATED TO A POKEMON
https://ift.tt/2N0Fb5p
Submitted June 26, 2018 at 11:42AM by aayush1408
Submitted June 26, 2018 at 11:42AM by aayush1408
when JavaScript beat C
https://ift.tt/2KliIBA
Submitted June 26, 2018 at 07:59AM by ledbit
Submitted June 26, 2018 at 07:59AM by ledbit
Monday, 25 June 2018
April 2018 Release Updates from the Node.js Project
https://ift.tt/2Fj88o2
Submitted June 25, 2018 at 06:28PM by ICYMI_email
Submitted June 25, 2018 at 06:28PM by ICYMI_email
Looking for a reasonably priced Node.js server with MongoDB
As the title says, I am just learning Node.js using express and MongoDB as server side applications. I am coming from a cpanel php/mysql background and trying to make the transition as cheap as possible. Without shooting myself in the foot for the journey. I am looking for recommendations for yearly hosting for this environment.
Submitted June 25, 2018 at 05:39PM by Gazzooks
Submitted June 25, 2018 at 05:39PM by Gazzooks
new NPM package: Declarative Testing Framework for REST, GraphQL APIs
https://ift.tt/2JOaMFj
Submitted June 25, 2018 at 05:48PM by thatdaythisday
Submitted June 25, 2018 at 05:48PM by thatdaythisday
Send email with Sendgrid from Node.js with Google Analytics tracking
https://ift.tt/2tDgkLS
Submitted June 25, 2018 at 03:46PM by nlierman
Submitted June 25, 2018 at 03:46PM by nlierman
Why your startup needs serverless Slack bots
https://ift.tt/2Mlolgd
Submitted June 25, 2018 at 03:58PM by nshapira
Submitted June 25, 2018 at 03:58PM by nshapira
zombie.js probleme login please help me
hello all i hope that you having a good day,I'm having a problem when i want to log in a website using zombie.js i fill my login using that :var Browser = require("zombie");browser= new Browser();browser.visit("thenameofwebsite", function(){var a = browser.window.frames[2].document.querySelectorAll("input[type='text']")[0].value=username;var b = browser.window.frames[2].document.querySelectorAll("input[type='password']")[0].value=password;browser.window.frames[2].doLogin();//doLogin() is a function inside this website can i use it ??console.log(browser.dump());browser.wait().then(function() {console.log("ok");})});i have this error :Unhandled rejection TypeError: Cannot read property 'txtTime' of undefinedat Window.dispTime (thenameofwebsite/infoIndex.jsp:script:1:184)at Window.onload (thenameofwebsite/infoIndex.jsp:5:3)at el.addEventListener.event (C:\Users\user\projetanas\node_modules\jsdom\lib\jsdom\living\helpers\create-event-accessor.js:31:30)at invokeEventListeners (C:\Users\user\projetanas\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:193:27)at EventTargetImpl._dispatch (C:\Users\user\projetanas\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:119:9)at EventTargetImpl.dispatchEvent (C:\Users\user\projetanas\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:82:17)at Window.dispatchEvent (C:\Users\user\projetanas\node_modules\jsdom\lib\jsdom\living\generated\EventTarget.js:143:21)at Window.DOM.EventTarget.dispatchEvent (C:\Users\user\projetanas\zombie\lib\dom\jsdom_patches.js:177:31)at Document.window.document.addEventListener (C:\Users\user\projetanas\node_modules\jsdom\lib\jsdom\browser\Window.js:562:16)at invokeEventListeners (C:\Users\user\projetanas\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:193:27)Please hellp me and thank you !
Submitted June 25, 2018 at 01:43PM by saad20006
Submitted June 25, 2018 at 01:43PM by saad20006
A toy blockchain implementation, written in NodeJs(typescript), Angular 6 and gRPC(protobuf) protocol
I've just made a simple blockchain implementation, written in Pure Typescript. Just to figure out is gRPC better than JSON and how it fits into the browser/server workflow.Client app is written in Angular 6. May be useful as a starter point/educational project/experimenthttps://github.com/alexbyk/dummycoinDemo is also available. Feedbacks are appreciatedP.S. gRPC for web is a way more cool, than JSON, but not as flexible as graphQl is
Submitted June 25, 2018 at 02:09PM by alexbyk
Submitted June 25, 2018 at 02:09PM by alexbyk
Question: can Redux (or redux-persist) be used for event sourcing?
I was thinking about implementing CQRS and event sourcing to my backend. Redux (a front-end package) struck me as a very similar concept to event sourcing.Do you think it would be feasible to use Redux on backend to deal with the state and persist the events to something like Redis while saving the last known state to MongoDB (for easier querying)?
Submitted June 25, 2018 at 02:22PM by galkowskit
Submitted June 25, 2018 at 02:22PM by galkowskit
Nodejs WhatsApp Web clone V4.0 is now out!
Get WhatsApp web clone V4.0, grab your copy at https://dorochat.net/ . some of popular features includes 1.User is typing like whatsApp2.Inbox like whatsApp web3.Image & file upload4.You can upload up to 250 Images/files by just one click5.Multiple chat box like FacebookAnd Many Others, this doesn't serve as an advertisment, we want to help anyone in this community who might be struggling with Node Js application. we can help. See you around.WhatsApp Web Clone V4.0
Submitted June 25, 2018 at 11:47AM by MadBeatug
Submitted June 25, 2018 at 11:47AM by MadBeatug
Palantir – Active monitoring and alerting system using user-defined Node.js scripts.
https://ift.tt/2KduV7Z
Submitted June 25, 2018 at 11:59AM by gajus0
Submitted June 25, 2018 at 11:59AM by gajus0
Need some help on authentication
I am making an app, which is user based. I have read about token-based authentication and session-based authentication, But I don't know which is better for what scenarios. Also, i came across passportjs, but wonder if its safe and secure. Can somebody please help me on this?
Submitted June 25, 2018 at 08:20AM by sanketsingh24
Submitted June 25, 2018 at 08:20AM by sanketsingh24
Sunday, 24 June 2018
35 brilliantly designed 404 error pages
https://ift.tt/2q40WHm
Submitted June 24, 2018 at 07:08PM by ICYMI_email
Submitted June 24, 2018 at 07:08PM by ICYMI_email
How to alter HTML file or serve up a new one after processing is complete?
https://ift.tt/2yFqhOQ of all, I apologize for any lack of knowledge - I come from a Python background and this was my first delve into JS, let alone nodeJS.Basically, my question comes down to this. How can I change my code so that after "main(body);" on line 102 the HTML file changes to display the processed data?
Submitted June 24, 2018 at 05:25PM by andreaslordos
Submitted June 24, 2018 at 05:25PM by andreaslordos
Install RocketChat on Windows 10
Hi ,i wanna know how can i install RockeChat on my Windows 10 machine Also i dont want use Virtual Machine or install it on ubuntuThanks
Submitted June 24, 2018 at 02:30PM by OF_Shervin
Submitted June 24, 2018 at 02:30PM by OF_Shervin
Steam summer sale game Node.js bot - any help appreciated!
Hi all,Two people (myself and u/resir014) have been working away on this bot for the Salien steam summer sale.https://ift.tt/2KjU6sP about to head into the working week but there's still heaps to do and improve on in there so I figured I'd try reaching out and seeing if anyone else in the Node.js + Javascript Reddit community is interested in contributing.If you're keen, just fork the repo and start coding away.PRs, fixes, ideas and features are welcome.The game logic is mostly in sync with the PHP version but there is still some bits that could be bought across into the Node version.Please don't judge us too much for the screwy code! It's a script for a temporary game so it has to be done quickly rather than perfectly 👍I'm going to head off to bed now, thanks for your time and if you help its really appreciated!!!
Submitted June 24, 2018 at 01:11PM by Southern_paw
Submitted June 24, 2018 at 01:11PM by Southern_paw
Dumb question: Is this the 'right' way to make GET requests?
Node noob here. I have a button and when it's clicked, I want the user to be sent to a different page. In my (Jade/Pug) view, I have a form with a button inside it.I have the action set to /account and I have a route setup to call my account controller function which essentially calls render on the account view. Is the sample code below the 'right' way to make that get account request?form(action='/account', method='GET') .form-group button.btn.btn-primary(type='submit') View Account Thanks
Submitted June 24, 2018 at 10:10AM by phil917
Submitted June 24, 2018 at 10:10AM by phil917
What is the cat command?
I was trying to set up jest to process data to coveralls and I saw the command 'cat'. What does it mean? What does it do? Where does it comes from? I can't find anything on this on google...https://ift.tt/2MT186j --config config.json --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" I assume it's something to pipe the data into the .info file? However I get an error whenever I include cat into the script. Currently I have:"scripts": {"cover": "jest && cat ./coverage/lcov.info" } Node throws an error saying the command cat is either wrong or unknown.
Submitted June 24, 2018 at 11:50AM by Fasyx
Submitted June 24, 2018 at 11:50AM by Fasyx
CircleCi change branch
Hey,I have a project with two branches: master, development.On circleci when accessing the repository, I don't seem to find an option to choose the branch I want to let circleci run the tests. Since my master branch doesn't has any tests set up (it's basically an empty branch for now), circleci tells me it can't find anything to test (which is correct).How can I configure circleci to work on my development branch?My config.yml should be fine (npm test refers to jest):version: 2 jobs: build: branches: only: - development docker: - image: circleci/node:7.10 working_directory: ~/repo steps: - checkout - run: npm install - run: npm test
Submitted June 24, 2018 at 09:17AM by Fasyx
Submitted June 24, 2018 at 09:17AM by Fasyx
Saturday, 23 June 2018
Github Repositories Demonstrating a Modular Data Design and Modular handling of REST Endpoints?
Hi everyone,I'm looking for finding the best practices for the design architecture of Node Programs. Currently whenever I am writing a node Application I have a directory structure like:app.js[app.js requires all modules from /classes and uses them to make API endpoints. All my .get .post .put .delete endpoints are all in one file.]/classes[All modules each using 1 mongoose schema and defining functions go in here]/util[Any sort of module I use for logic in special use cases]I'm looking for articles/github repositories demonstrating how this should properly be done such that everything is modular. Is instatiating an express server and then having all app.get app.post app.put app.delete methods in one file. For whatever reason it just seems wrong to me?To any more experienced devs who frequent /r/node, how do you handle this?
Submitted June 23, 2018 at 07:48PM by Equality7_2521_
Submitted June 23, 2018 at 07:48PM by Equality7_2521_
publish-to-git: Publish private npm packages to Git repositories with npm publish semantics
https://ift.tt/2K5UzPW
Submitted June 23, 2018 at 07:52PM by RushPL
Submitted June 23, 2018 at 07:52PM by RushPL
[Question] writing post request without route
So I feel like a total noob for having to ask this but I have never had to write a request without it having a route. So basically I need to call a post request periodically to get a new bearer token from a service to be used in all my API calls. During the development, I have just been using Postman to get a new bearer token and just hard coding it in. Now that it is going live I need to automate that.At this point, I am at a loss as to how I would structure a POST request without a route. This is just going to be triggered server side without user interaction.I know this is pretty vague and I am probably missing some fundamental understanding but I can't find anything from googling that refers to what I am trying to do(probably not asking the right questions). If anyone could point me in the right direction it would be greatly appreciated.TL:DR - Need to make post request to get new bearer token from service to use in my API calls. Not sure how to do this without using routes.
Submitted June 23, 2018 at 06:11PM by onlyslavesobey
Submitted June 23, 2018 at 06:11PM by onlyslavesobey
Tutorials for deploying Nodejs Apps
I have been using PHP and apache for years and I have recently started learning Node, do you guys know any good tutorials that shows you how to securely deploy node apps on a server.
Submitted June 23, 2018 at 06:50PM by RawaZz95
Submitted June 23, 2018 at 06:50PM by RawaZz95
What have I missed since 0.12?
I haven't used NodeJS since 0.12 and saw there has been a lot released since then and am thinking about getting back into Node. What are some of the cool new features that have come with all the recent releases that I should look into?
Submitted June 23, 2018 at 05:40PM by GarlicoinInvestor
Submitted June 23, 2018 at 05:40PM by GarlicoinInvestor
How can I send a data to a client (React app) which I received from a python app?
I'm creating a server to send data to the React UI which I'm receiving from a python app. Python app is not a web app. It's just a script. What I'm doing is I'm sending a JSON object to a route from python when the script is executed. Then I need the react app to receive the data and render it in the View. How can I do that ? I created a route and made a POST request from Python script to that route so I receive the data in the node. It works, what I need now is to send a POST request inside that POST request (which I receive data from Python script) , As making a POST request inside another POST request is impossible, how can I do this ?This is my route which I receive data.app.post('/getdatafromapp', (req,res) => { console.log("Got data"); let data = req.body; console.log(data); res.send('Hello'); });I need to make a POST request with data (req.body of the above POST request) as the body, to React frontend. How can I do that ?Any help would be appreciated. Thanks.
Submitted June 23, 2018 at 02:39PM by sp3co92
Submitted June 23, 2018 at 02:39PM by sp3co92
✨ Immensely upgrade your development environment with these Visual Studio Code extensions
https://ift.tt/2Kj03pK
Submitted June 23, 2018 at 02:57PM by thickoat
Submitted June 23, 2018 at 02:57PM by thickoat
Simple metrics/stats tracking service (API)? (x-post /r/javascript)
https://ift.tt/2MRRCjD
Submitted June 23, 2018 at 01:59PM by miracleof86
Submitted June 23, 2018 at 01:59PM by miracleof86
Node.js Open Source of the Month (v.June 2018)
https://ift.tt/2Ki9qmE
Submitted June 23, 2018 at 01:03PM by Rajnishro
Submitted June 23, 2018 at 01:03PM by Rajnishro
How to update req.user
Hi, I am using passport for my authentication and everything works fine, except when the user changes his username. I update the user's data in the DB however when I call req.user it still shows the old username. Is there any way to update req.user without logging the user out? Thanks in advance :)
Submitted June 23, 2018 at 09:50AM by everek123
Submitted June 23, 2018 at 09:50AM by everek123
Passing a MongoDB/MongooseJS object to an instance of a class and updating/saving it inside that instance?
Essentially I'm trying to pass a MongoDB document/object to an instance of a helper class I have. I want the helper class to make some network calls, update the user, then save it back to the database. The problem is how do I get my Helper class to realize that it's working with the User schema?I have something similar to this: const User = require('./models/User');myFunction() { let myHelper = new Helper(); // Below is some code to find a certain user from my database User.findById(someUserID, function (err, user) { myHelper.someFunction(user); }); } Then in my Helper class:someFunction(user) { user.name = 'total idiot'; user.save(function (err) { //updated user saved to database }); } But of course, when I do that, I get this error: TypeError: Cannot read property 'save' of undefinedAny help would be much appreciated. Thanks!
Submitted June 23, 2018 at 08:42AM by phil917
Submitted June 23, 2018 at 08:42AM by phil917
Draft: Online markdown editor!
DraftOnline markdown editorFeaturesSupport Standard Markdown and GFM;Import and Export to pdf\md\html;Real-time Preview, Table generate, Code block, search\replace\go to line, Read only, Code syntax highlighting... ;Support [TOC] (table of content);OCR ([baidu-sdk](https://ift.tt/2Ikuxma) and Image link generate ([SMMS](https://ift.tt/2K27zGv [KaTex](https://ift.tt/2AeDZ8o) and [Twemoji](https://ift.tt/2K5WG6j Shortcuts;Demohttps://i.redd.it/u5glla0vip511.png[Let's Try Now!](https://ift.tt/2IiX4bW you like my little side project, give me a star! I'll be so happy!!!
Submitted June 23, 2018 at 08:57AM by oddisland
Submitted June 23, 2018 at 08:57AM by oddisland
Friday, 22 June 2018
Threads in Node 10.5.0: a practical intro
https://ift.tt/2K2zlT9
Submitted June 22, 2018 at 05:07PM by fdoglio
Submitted June 22, 2018 at 05:07PM by fdoglio
Submit a talk to React Day Berlin 👋
https://ift.tt/2tlpVYk
Submitted June 22, 2018 at 05:14PM by FrontendNation
Submitted June 22, 2018 at 05:14PM by FrontendNation
How to query(express)?
Hey,so I'm about to implement querying to my API and read about some possibilities in this article. Since I'm using Sequelize.js on my backend, I tried the LHS approach, which worked out perfectly combined with the operators provided by Sequelize.jsAn example:/user?id[gt]=1&id[lt]=3 would result in (using qs)id: { gt: 1, lt: 3 } which I could simply pass in to my Sequelize.js where statement (keep in mind I used aliases, as shown here (without the $, though):User.findAll({ where: { id: { gt: 1, lt: 3 } })} This works fine.However, as described in the Sequelize.js docs, an or statement would need to look like this:User.findAll({ where: { id: { or: [1,3] } })} Is there any way I could get this by using qs?When I try to query like this:/user?id[or]=1,2 qs.parse() returns{ id: { or: '1,2' } } Although in this case I would need{ id: { or: [1,2] } } Therefore querying like this: /user?id[or]=[1,2] results in{ id: { or: '[1,2]' } } Any suggestions? Are there other ways to implement querying? I want to be able to provide as much filter, sort, query options as possible.
Submitted June 22, 2018 at 05:33PM by Fasyx
Submitted June 22, 2018 at 05:33PM by Fasyx
Node.js Backend Development - Implementing Improved Routing - DiscoverSDK Blog
https://ift.tt/2lr1lB1
Submitted June 22, 2018 at 06:24PM by ICYMI_email
Submitted June 22, 2018 at 06:24PM by ICYMI_email
nudity images control
Hi guys. I'm doing an api that implements files uploads and i wonder how i could filter unrelated images.I know that Facebook uses their AI to do the trick.I can't imagine a person sitting all day in his office looking at pics one by one before approving the post. How do you guys deal with it ? Is there any existing solution ?Thank you for your help.
Submitted June 22, 2018 at 04:04PM by Surikaate
Submitted June 22, 2018 at 04:04PM by Surikaate
Echoing incoming socket io to TCP connection
Full source below. Getting my feet wet with node.js, have created a simple server that echos any data it receives. I have successfully connected and communicated with several clients via socket.io but now I'm trying to transmit over TCP to a .NET application.I'm missing how to to a socket.write() call inside the io.on function. I'm sure I'm missing the obvious, would appreciate any help.var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); var net = require('net'); var tcp_server = net.createServer(function(socket) { console.log('TCP Server Created'); }); tcp_server.listen(3600, function(){ console.log('listening on *:3600'); }); http.listen(3500, function(){ console.log('listening on *:3500'); }); io.on('connection', function(socket){ console.log('user connected'); socket.on('update', function(msg){ io.emit('update', msg); //Want to broadcast msg over TCP here console.log('update', msg); }); }); tcp_server.on('connection', function(socket){ console.log('TCP user connected'); socket.on('data', function(msg){ io.emit('update', msg); socket.write(msg); console.log('data', msg); }); });
Submitted June 22, 2018 at 04:10PM by PeanutTheGladiator
Submitted June 22, 2018 at 04:10PM by PeanutTheGladiator
"The journey of a package from the npm registry to your computer" by Jeffrey Lembeck (JSHeroes 2018)
https://www.youtube.com/watch?v=GSnyVS79OR0
Submitted June 22, 2018 at 03:59PM by katerina-ser60
Submitted June 22, 2018 at 03:59PM by katerina-ser60
How does upgrading to Node v8 help reduce operating costs
https://ift.tt/2JZr6He
Submitted June 22, 2018 at 02:59PM by atanasovd
Submitted June 22, 2018 at 02:59PM by atanasovd
HTTP Requests — you are (probably) doing it wrong – SwingDev Insights – Medium
https://ift.tt/2tu9VCS
Submitted June 22, 2018 at 01:42PM by ab-azure
Submitted June 22, 2018 at 01:42PM by ab-azure
Thursday, 21 June 2018
Offline-First with Node.js and Hoodie: A Practical Introduction to Progressive Web Apps
https://ift.tt/2y8rluq
Submitted June 21, 2018 at 06:22PM by ICYMI_email
Submitted June 21, 2018 at 06:22PM by ICYMI_email
Good node CMS?
Title basically says it all, Can anyone recommend a good CMS for a node backend
Submitted June 21, 2018 at 04:16PM by thenewdev1
Submitted June 21, 2018 at 04:16PM by thenewdev1
[FREE VIDEO COURSE] Angular 6 – MEAN Stack Crash Course – Part 2: Implementing The Back-end
https://ift.tt/2tor5BK
Submitted June 21, 2018 at 04:16PM by codingthesmartway
Submitted June 21, 2018 at 04:16PM by codingthesmartway
Suggestions on what to use
Hi allI've been sitting here working on an app and I can't figure out what the best solution would be for what I'm trying to achieve.I have a NodeJS application that allows requests to be made to it via an API call - and what I would like to do is store the results of the API call in a database so my clients/users are able to view the hits and data in a dashboard that they can log in to.I will also be providing metrics data such as how many requests they've made and what possibly conversion rates that I will be querying the DB on.Will a simple RDBMS work or even a noSQL DB? or would I need something totally different.Just to also add - I was thinking of RethinkDB as I would be allowing the customers to sign up for web hooks and the "changes" API would be really helpful.Thoughts?
Submitted June 21, 2018 at 04:28PM by sandeepsb
Submitted June 21, 2018 at 04:28PM by sandeepsb
Functional Programming Unit Testing in Node - Part 1 of 6
https://ift.tt/2MbJFEW
Submitted June 21, 2018 at 02:21PM by moranjavascriptworks
Submitted June 21, 2018 at 02:21PM by moranjavascriptworks
how to use .gitignore with GitHub and stuff
So I'm a noob and I recently pushed an Ionic project to GitHub, which resulted in me getting a warning about there being an API key from Google. I tried adding the file containing the key to .gitignore but it somehow still made its way to GitHub. I don't understand how this stuff works. Should I just write the file's name (like firebase.config.ts) in .gitignore, or, I should specify the relative path of the file, for example: src/app/firebase.config.ts ?
Submitted June 21, 2018 at 02:23PM by ncubez
Submitted June 21, 2018 at 02:23PM by ncubez
Looking for a Reverse Proxy library that supports manipulation of HTML content
What I'm looking for is a library that acts as a reverse proxy, pulling content from a remote server, while allowing the contents (HTML) to be edited/modified in-between.Are there any libs out there for the mission?
Submitted June 21, 2018 at 02:36PM by jovanshalamov
Submitted June 21, 2018 at 02:36PM by jovanshalamov
Async/Await with React and Redux using Thunks
https://ift.tt/2tdMTR4
Submitted June 21, 2018 at 02:45PM by code_barbarian
Submitted June 21, 2018 at 02:45PM by code_barbarian
A minimal Node.js with Babel Setup
https://ift.tt/2tnzwgs
Submitted June 21, 2018 at 03:01PM by rwieruch
Submitted June 21, 2018 at 03:01PM by rwieruch
V8 release v6.8
https://ift.tt/2IbQ5RZ
Submitted June 21, 2018 at 02:59PM by hfeeri
Submitted June 21, 2018 at 02:59PM by hfeeri
HTTP server middleware for detecting and rejecting SQL injection attempts
https://ift.tt/2llgPqm
Submitted June 21, 2018 at 11:23AM by atredeux
Submitted June 21, 2018 at 11:23AM by atredeux
Wednesday, 20 June 2018
Axios response with 64-bit integer
I'm using Axios to request data from an API. The API responds with data, but the data contains a 64-bit integer ID field. JavaScript only supports up to 53-bit integers, so the last digits of the ID are rounded up (or something).Example:I send a request to the APIThe API responds with data containing ID 900,719,925,474,099,199Axios stores this ID as a Number, but because the ID is higher than Number.MAX_SAFE_INTEGER, the last numbers are rounded up resulting in ID 900,719,925,474,099,200and I'm left with an invalid ID.The first solution that came to mind was to simply store the ID as a string instead of a Number, but I don't know how to tell Axios to do that. Is there a way? Do I perhaps have to use another library? Or is there some other solution that I haven't thought of?
Submitted June 20, 2018 at 04:00PM by dr_goodweather
Submitted June 20, 2018 at 04:00PM by dr_goodweather
PZ-100 - A small JS puzzle game packaged as an NPM module
https://ift.tt/2K36D0k
Submitted June 20, 2018 at 04:29PM by JoelBesada
Submitted June 20, 2018 at 04:29PM by JoelBesada
Learn how to connect your Angular Frontend to a NodeJS & Express & MongoDB Backend by building a real Application
https://ift.tt/2lktXMn
Submitted June 20, 2018 at 04:22PM by marteinbaven
Submitted June 20, 2018 at 04:22PM by marteinbaven
Can't seem to get sessions to work
Help my sessions are working as intended by there's a key thing I might be missing so they seem broken and I can't really figure out why.I have in my Routes/user this:https://ift.tt/2Kb287q is supposed to add some formatted errors which I intend to use in the pages where an error might happen. Then, in my app I have the following middlewarehttps://github.com/inabahare/lewd2/blob/Validation/src/app.js#L69Now if I output the errorArray I'll get just what I expect. But when I output req.session in the middleware in app.js I get what I expect from multer, but then I also get err as an empty array.What I wanna do is show errors when errors are happening. So for instance, when an admin adds a user, but they write a too short username I'd like to show it at the form (which would be here)
Submitted June 20, 2018 at 03:23PM by inabahare
Submitted June 20, 2018 at 03:23PM by inabahare
Is it possible to have more than 1 global script environment?
While writing tests(i used Jest), i stumbled into thing part of the code that worked fine when not testing, but broke when running from Jest.Problem was in this line(yes i know that Array.isArray exists).if (someVariable.constructor === Array) { // something} What happed is that while someVariable was actually an array, check failed, instanceof returned false too, but debugger and Array.isArray confirmed that it is actually an array Array. I even went ahed, and comparedsomeVariable.__proto__.__proto__ === Object Wich resulted in false. I googled for a bit, and found this articleBasically what it is sayng that in browser JS, there could be more than one window instance. Wich also results in false, when comparing 2 constuctors from diffrent window environment.So it might be, that i have similar porblem, but in node. Can something like 2 global environment be done?Thank you!
Submitted June 20, 2018 at 03:26PM by SandOfTheEarth
Submitted June 20, 2018 at 03:26PM by SandOfTheEarth
Private Instant-Messenger Keeps You Anonymous on All Browsers & Devices.
https://ift.tt/2LptynG
Submitted June 20, 2018 at 03:41PM by tehpwnbanana
Submitted June 20, 2018 at 03:41PM by tehpwnbanana
C# Node Manager : Where to start?
Hi there!I might be on the wrong reddit to ask this, but as I want to handle Nodejs process, I'm giving it a go.I want to build a custom c# Node Manager with a GUI. I know there are options out there, but I like to have something customized and I have some spare time at night. Also I think it will be a fun learning experience.In my manager, I want to be able to create a list, with each node. In each item, I have the path to the app.js (or the main js file) to start it.I press a play button and it start the process with a local network account. I want to be able to kill the process, get it logs ect..I basically want to make something like PM2 /Appache.Where should I start?I looked it up yesterday and I,m not sur where I should start to learn this.I thought about starting it with the process library, keeping the PID in a local database, and followin it up. Still don't know if I will be able to keep the log?Thanks!
Submitted June 20, 2018 at 02:29PM by Kardiamond
Submitted June 20, 2018 at 02:29PM by Kardiamond
How JavaScript works in browser and node? – Medium
https://ift.tt/2FdttPD
Submitted June 20, 2018 at 01:12PM by Fewthp
Submitted June 20, 2018 at 01:12PM by Fewthp
JSON Web Tokens Suck
https://www.youtube.com/watch?v=pYeekwv3vC4
Submitted June 20, 2018 at 12:59PM by Ewers
Submitted June 20, 2018 at 12:59PM by Ewers
Track blockchain transactions LIKE A BOSS with web3.js
https://ift.tt/2K1Vm0i
Submitted June 20, 2018 at 01:09PM by AlexBV1
Submitted June 20, 2018 at 01:09PM by AlexBV1
Code.xyz adds GitHub Gist import and export for easily building Node.js APIs from your browser
https://ift.tt/2tbDt93
Submitted June 20, 2018 at 09:59AM by notoriaga
Submitted June 20, 2018 at 09:59AM by notoriaga
Is there a module which will generate a REST client based on OpenAPI specs on the fly?
I recently was going through the swagger components and saw REST clients code generators are available. However, I was wondering if any module is available that will generate a client during run time and will work on both nodejs and browser.Something like this:```javascriptlet client = ClientFactory.getClient(openApiSpecs);let reponse = client.addEmployee({name:"ABC"});```
Submitted June 20, 2018 at 08:54AM by abskmj
Submitted June 20, 2018 at 08:54AM by abskmj
Should we stop writing to log files?
[A spin of a thread that discusses console.log leaks]My hypothesis says: We should start writing to process.stdout instead of log files. The modern deployment models, k8s and serverless, dictate short-lived hardware that gets standard input and emits standard output, sometime without disc access or with disc that dies frequently. When you write to stdout (under the hood, this is just a file descriptor) those platforms will collect and forward the entries. No additional configuration is needed. On the other hand, writing to log files demands custom configurations + mounting + assuming write permissions - we deviate from the standards that the platforms suggest. What do you think?
Submitted June 20, 2018 at 09:06AM by yonatannn
Submitted June 20, 2018 at 09:06AM by yonatannn
Tuesday, 19 June 2018
How do I handle crashes with multiple socket.io processes?
I'm building a chat application. The user list is stored in redis when clients connect.Here's an example:io.on('connection', function(socket) { var userID = getUserID(socket.handshake.headers.cookie); redis.hset("chat:test", userID); socket.on('disconnect', function() { redis.hdel("chat:test", userID); }); }); I'm using socket-io-redis to connect all of the processes together.I'm not sure how to handle crashes in this case. Let's say one process crashes. All of the users who were connected on that process will remain in the user list that's stored in redis because the disconnect event never fired.One thought I had was that I'd have one master process and all socket.io processes would send the information of all clients who connected / disconnected to the master process.If a worker crashed, the master would remove the users from the user list and handle it just like the worker normally would.I'm not sure if this is the right way to solve this issue, but hopefully someone here can point me in the right direction if it isn'tI'd appreciate any help you guys can give
Submitted June 19, 2018 at 06:03PM by O40dzLttx27cAoekaGBR
Submitted June 19, 2018 at 06:03PM by O40dzLttx27cAoekaGBR
JWT logout using blacklist method
Hello,I'm working on the authentication part of my app and have reached the part where I need to make it possible to logout. So I decided to use the blacklist method where I store the token and reference it whenever a user wants to access a secure route. I'm now using a mysql database for all the other data that is being stored.Most places say I need to create a new database to store the blacklisted tokens but can't I just create a new table inside the existing database and store them there? After they have been stored they need to be deleted (after they've expired so they don't pie up) using an SSL-option which some databases have. Does anyone know if mysql has SSL support and how I should use it?It was quite hard to find any good tutorials on logout with jwt so if anyone has any tips I would really appreciate it!
Submitted June 19, 2018 at 05:31PM by Sirzorre
Submitted June 19, 2018 at 05:31PM by Sirzorre
A stand against the “easy” nodejs backend
https://ift.tt/2K6hB8u
Submitted June 19, 2018 at 05:28PM by devinivy
Submitted June 19, 2018 at 05:28PM by devinivy
How to import/export ES6 modules in Node.js
https://ift.tt/2JZFQlA
Submitted June 19, 2018 at 04:14PM by saranshk
Submitted June 19, 2018 at 04:14PM by saranshk
How to use express for sending request through headers?
So I'm sending https request through express using app.get(), the parameters it requires originally are the link and function which takes request and response as arguments. But now the api to which I'm making call requires headers containing session token and id which needs to be passed through the URL in app.get(). Is there any way to pass the headers using app.get()?Thank you in advance!
Submitted June 19, 2018 at 03:15PM by bhavitvya
Submitted June 19, 2018 at 03:15PM by bhavitvya
6 Reasons to Choose Node.js for Web Development
https://ift.tt/2I1aGIQ has been successful since it was launched. Many developers find it perfect for building fast, multi-user web applications. As you may know, Node is written in JavaScript.That is why it is very easy to learn if you know JavaScript. In this article, you are going to get a list of reasons to choose Node.js.https://ift.tt/2taDqKt real-time applications in Node.jsDo you want to create a chat application? Or maybe a gaming site? To build that kind of apps, Node.js is the best option for you.It is also a good choice for apps that need an event-based server and non-blocking driven servers. Popular websites like PayPal, Yahoo, Ancestry, and Quizlet use Node on their servers.https://ift.tt/2I1RKJV created fast V8 JavaScript engine for their browsers. Node.js uses it too. For you as a developer, only thing to worry about is writing proper code, and Node will take care of the speed.https://ift.tt/2taDt97 reusabilityCreating web apps in Node.js is much easier thanks to NPM(Node package manager). Developers can easily share and reuse their code with NPM. There are many useful packages out there, including packages for security, file uploading, databases and more.https://ift.tt/2M1qptM programming language for everythingAnother reason why Node is game-changer in web development is that developers can use same programming language on both client- and server-side. This feature does not only save time but also helps to synchronize different data automatically between server and client.https://ift.tt/2taDudb streamingNode.js allows you to access a particular file while uploading it. Developers who work with real-time audio or video encoding benefit from this. If you want to create a streaming app like YouTube or Twitch, it is very easy in Node.js.https://ift.tt/2I3E2WK is the most popular Node framework. Express.js is easiest to learn when comparing to other Node frameworks. It provides a wide variety of middlewares for all kinds of purposes.Two reasons why I would choose Express over other Node frameworks:It is very easy to handle middlewares.You can use Node.js native HTTP classes in Express.I recommend you to try Node.js if you like JavaScript. You can skip learning curve of another programming language if you choose Node for your back-end technology.Leave a comment if you have any questions. Share this article if you liked it. Also, check out these video tutorials by Traversy Media if you are interested in Node:https://www.youtube.com/watch?v=U8XF6AFGqlchttps://www.youtube.com/watch?v=gnsO8-xJ8rs
Submitted June 19, 2018 at 02:12PM by simeonplatonov
Submitted June 19, 2018 at 02:12PM by simeonplatonov
Strapi v3@alpha.12.5 - Search, Filters & Bulk Actions
https://ift.tt/2JRQsH6
Submitted June 19, 2018 at 12:34PM by pierreburgy
Submitted June 19, 2018 at 12:34PM by pierreburgy
Node.js training
Hi,I was wondering if anyone could recommend some free online training resources for learning the Node.js basics and even advanced tutorials if available? I usually use codeacademy but they dont appear to have anything just on Node.Thanks
Submitted June 19, 2018 at 09:51AM by tyc6
Submitted June 19, 2018 at 09:51AM by tyc6
Monday, 18 June 2018
Can't connect to MSSQL server
Hi,So I'm trying to connect to a mssql database with Knex but I get this error:"Thu, 14 Jun 2018 16:21:22 GMT tedious deprecated The default value for `options.encrypt` will change from `false` to `true`. Please pass `false` explicitly if you want to retain current behaviour. at node_modules\mssql\lib\tedious.js:212:23 Unhandled rejection ConnectionError: Failed to connect to 151.80.119.227,14831:1433 - getaddrinfo ENOTFOUND 151.80.119.227,14831 at Connection.tedious.once.err (C:\Users\mw\Documents\TestServer\node_modules\mssql\lib\tedious.js:216:17) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) at Connection.emit (events.js:211:7) at Connection.socketError (C:\Users\mw\Documents\TestServer\node_modules\tedious \lib\connection.js:1004:14) at C:\Users\mw\Documents\TestServer\node_modules\tedious/lib\connection.js:869:25 at GetAddrInfoReqWrap.callback (C:\Users\mw\Documents\TestServer\node_modules\tedious lib\connector.js:69:18) at GetAddrInfoReqWrap.onlookupall [as oncomplete] (dns.js:104:17) This is my Knex variable:var knex = require('knex')({ client: 'mssql', connection: { host : '151.80.119.227,14831', user : '****', password : '****', database : '*****' } }); Am I doing something wrong?
Submitted June 18, 2018 at 05:46PM by Madfishermansdog-
Submitted June 18, 2018 at 05:46PM by Madfishermansdog-
Changing the homepage url
Our company is currently using a Wordpress site for our blog articles.We completed our MEAN stack application and would like to have the landing page we created using node/angular to become the page users see when they visit our website.Our developers explained that this cannot be done without negatively affecting our SEO because the Wordpress site will have to be moved to a different directory changing all of the urls of the articles. For example, the new website address for the Wordpress site will become www.example.com/blogThe development team instead suggests to move the application to a sub domain instead of the sub-directory and providing links on the Wordpress site redirecting users to the application.My question:Is it possible to make our homepage the MEAN stack landing page without changing the URLs of our Wordpress site url structure and negatively affecting our SEO?If so, how can we accomplish this?
Submitted June 18, 2018 at 05:49PM by ineedhelpcoding
Submitted June 18, 2018 at 05:49PM by ineedhelpcoding
Help with a service that works with 2 databases in Node.js, using Sequelize/Postgres and MongoDB
I've been currently tasked with creating an invoice service, it needs to process/create the invoices in 1 service and process the charges with stripe in another service. I have to count and pair sms with a specific id, total count and then use the ID on those to know who to charge and look for my specific user for the stripe charge.I started my first dev job as a Jr Node Dev, currently on my second month. I'm struggling with some things about this.1.- We have 2 different databases that are going to "interact" for this so I kinda need a way to store the ID of the sms and use them to create the invoice for the specific user and later charge them.2.- In the case of the MongoDB one there's a collection for every new day, so I haven't found a way of specifying the name of the collection when making queries, or multiple ones since I need to create an invoice for the last 15 days.This is the mongo model for the smsMy sequelize model for the invoicesThe file with the status detailsI already have a service for the sms sending part and I think this service could work as a blueprint for the invoice service, obviously changing a few stuff but I'm pretty much lost on how to interact with those 2 databases in an easy way.Any help would be appreciated!
Submitted June 18, 2018 at 03:42PM by SeraphineX93
Submitted June 18, 2018 at 03:42PM by SeraphineX93
node.js Buffers concat is driving me nuts
Hello reddit,i am currently investigating in a bug that is driving me crazy the whole day. Googling, Stackoverflow, every blog says that the Buffer.concat(list, length) function is there to achieve the appending of all buffers to a single one. But all i get after concatenating multiple buffers is the first one.I am fetching small .wav files from a server and try to append them to a single new buffer and send it over to the frontend. Those files are small 2 seconds samples.On the frontend i want to turn that buffer into an AudioBuffer. Which works, but only plays the first buffer of the buffer list.I use node-fetch for that on the express.js backendfetch(url).then(response => response.buffer());I do that for a number of 1-20 files and store those buffers in an array.I checked every buffer in that array and wrote it to a file on the server. Every single file is playable and unique.But if i do thatlet concatedBuffers = Buffer.concat(allBuffers, totalLength);and write that big buffer ( got the size of all buffers combined, still below 5 MB) to a file, it only represents the first buffer item.I tried to use a library for buffer concat, i even wrote an implementation. But still the same result. Only the first buffer is there after appending.Does someone have a clue and can point out my misleading understanding of Buffers, please?The implementation ( copied from buffer-concat library):function concatenateBuffers( list, length? ){let size = 0;if (!Array.isArray(list)){throw new Error('Usage: concatenateBuffers(list, [length])');}if (list.length === 0){return new Buffer(0);} else if (list.length === 1){return list[0];}if (typeof length !== 'number'){size = 0;for (let i = 0; i < list.length; i++){let buf = list[i];size += buf.length;}console.log('calculated Size: ', size);} else {size = length;}let buffer = new Buffer(size);let pos = 0;for (let i = 0; i < list.length; i++){let buf = list[i];buf.copy(buffer, pos);pos += buf.length;}return buffer;}
Submitted June 18, 2018 at 02:28PM by drdrero
Submitted June 18, 2018 at 02:28PM by drdrero
Creating a Task Management Application with Grunt and CoffeeScript - Medium
https://ift.tt/2t6kPzg
Submitted June 18, 2018 at 02:37PM by onig90
Submitted June 18, 2018 at 02:37PM by onig90
What exactly is Node.js? – freeCodeCamp
https://ift.tt/2ymtrGR
Submitted June 18, 2018 at 03:07PM by ICYMI_email
Submitted June 18, 2018 at 03:07PM by ICYMI_email
Introducing Blockbase - ES6 ultra-light Node.js framework
Hi there !We've released last week the open-source beta of Blockbase, our in-house Node.js framework.https://ift.tt/2lhZwWU building an another framework ?Working on several projects every year, we've built step by step an internal set of libs containing reusable components.Day after day we packaged it in a private internal framework, today we've just decided to open-source it :)Pros- ES6 / Async Await compliant (no-babel needed, just install node@stable, npm i & rock it !)- Ultralight - Micro Service Oriented- A cool plug & play driver system to add new features / connectorsCons- Well, as a young framework we might miss some documentation. Don't hesitate to require infos (in issues or at [code@blacksmith.studio](mailto:code@blacksmith.studio)- We are working on new connectors (drivers) such as MongoDB, GraphQL or Restify, don't hesitate to ask anything we might have missed.Enjoy !Alex from Blacksmith
Submitted June 18, 2018 at 02:12PM by SureGas0
Submitted June 18, 2018 at 02:12PM by SureGas0
Part 1: GraphQL with Node and Express
https://ift.tt/2JXuCOC
Submitted June 18, 2018 at 12:48PM by real_trizzaye
Submitted June 18, 2018 at 12:48PM by real_trizzaye
node.js development company india
https://ift.tt/2HYm08F
Submitted June 18, 2018 at 11:35AM by MetaDesignSolution
Submitted June 18, 2018 at 11:35AM by MetaDesignSolution
NODE.JS DEVELOPMENT COMPANY INDIA
Our Developers are adept at Node.JS Development Services, a development platform based on Google’s V8 Javascript engine. With over 5 years of experience with Node.JS, our expert developers can rapidly create custom solutions for both Large Enterprises and Startups. When you Hire Node.JS Developers from MetaDesign Solutions, you’re guaranteed a high quality, timely delivery, as we’ll leverage our experience as a Node.JS Development company India to ensure your complete satisfaction.
Submitted June 18, 2018 at 11:48AM by MetaDesignSolution
Submitted June 18, 2018 at 11:48AM by MetaDesignSolution
Mongoose query by date help
Good day people,I have a field with `{ type: Date }` and I want to query all dates created on a certain year and or month. I've currently written something like this:if (year && month && day) { return { $gte: new Date(year, month - 1, day, 0, 0, 0), $lte: new Date(year, month - 1, day, 23, 59, 59) } } if (year && month) { return { $gte: new Date(year, month - 1, 2, 0, 0, 0), $lte: new Date(year, month - 1, 28, 23, 59, 59) } } if (year) { return { $gte: new Date(year, 0, 2, 0, 0, 0), $lte: new Date(year, 11, 31, 23, 59, 59) } } However, it's not working. I have also tried an using `.aggregate` which works but I don't find it intuitive since I can't filter out by other fields after getting the aggregate result.Please help point me to the right direction, thanks!
Submitted June 18, 2018 at 10:59AM by chaseroyaleee
Submitted June 18, 2018 at 10:59AM by chaseroyaleee
Teaching myself how to node in 2018, A Different Type of How To Article
https://ift.tt/2HXZdtn
Submitted June 18, 2018 at 08:13AM by tamalweb
Submitted June 18, 2018 at 08:13AM by tamalweb
Building this twitter clone with Node.js, User can register with an email, login, post a new tweet, have profile, profile picture, update account etc.
https://ift.tt/2JZZRM0
Submitted June 18, 2018 at 08:15AM by tamalweb
Submitted June 18, 2018 at 08:15AM by tamalweb
Sunday, 17 June 2018
How can i quickly learn NodeJS in order to be relevant as a Back-end developer?
No text found
Submitted June 17, 2018 at 09:52PM by chilusoft
Submitted June 17, 2018 at 09:52PM by chilusoft
I finally released Vynchronize, a video synchronization platform project I have been working on for the past few months! Check it out! :)
https://ift.tt/2C3Kz0G
Submitted June 17, 2018 at 09:13PM by kyle8998
Submitted June 17, 2018 at 09:13PM by kyle8998
How to make platform hosting app and website? like Spinrilla or Datpiff?
How to make platform hosting app and website? like Spinrilla or Datpiff?I have clientale who are exclusive artists. Two of them just got signed by Jay-Z's Roc Nation. I was wondering what would I need to start hosting platform app and website. That exclusively destribute their music. Cutting off the competition and controlling our own content. What is cooler then a artist having his custom music streaming app?I want to make my own site or app like spinrilla amd datpiff. What do I need to do that.A key feature of DatPiff is that unregistered users are allowed to download for free any mixtape uploaded to the site that has been Sponsored - i.e. funded by the artist or label. Registered users are permitted a limited number of downloads of non-sponsored mixtapes per day. Premium paid users have an unlimited number of downloads of any mixtape. Mixtapes may be streamed by any user. Premium content may also be purchased.
Submitted June 17, 2018 at 05:08PM by ColdCaseQuiet
Submitted June 17, 2018 at 05:08PM by ColdCaseQuiet
Any tips for audio file manipulation with Node?
I have seen several front-end libraries using the web audio API. I am looking for something to run on the backend, specifically aiming to get this working as an AWS Lambda function, though I have no experience with that yet.Looking for the ability to:convert wav, flac, oog, and webm to mp3 or webmconvert from mono to stereo, some method of interacting with audio channels.equalizer controls, a way to interact with frequencies.Anyone have any experiencing with editing audio directly via node if an NPM isn't available? Wondering how I'd even begin that.
Submitted June 17, 2018 at 03:50PM by TechSquidTV
Submitted June 17, 2018 at 03:50PM by TechSquidTV
Integrate IBM Domino with Node.js
https://ift.tt/2tbRrHb
Submitted June 17, 2018 at 02:17PM by ICYMI_email
Submitted June 17, 2018 at 02:17PM by ICYMI_email
Cancelable Async Flows (CAF)
https://ift.tt/2CGqApY
Submitted June 17, 2018 at 03:14PM by fagnerbrack
Submitted June 17, 2018 at 03:14PM by fagnerbrack
I have not been able to use an insert statement in a loop or a recursive function properly. Can someone help?
https://ift.tt/2tgt0Z5
Submitted June 17, 2018 at 03:24PM by INSERTINTOpornstash
Submitted June 17, 2018 at 03:24PM by INSERTINTOpornstash
Node.js in term of web apps
is node only popular when we want to develop single page web apps? can someone give me a good explanationon what do node developer usually use it for? is it single web app, ecommerce, RESTs? because i heard that because node is single thread and it s very complicated when you want to build apps like project management ecommerce etc
Submitted June 17, 2018 at 01:46PM by WHuangz
Submitted June 17, 2018 at 01:46PM by WHuangz
My most hated JavaScript features
https://ift.tt/2Mu9NvD
Submitted June 17, 2018 at 12:50PM by craigtaub
Submitted June 17, 2018 at 12:50PM by craigtaub
[Advice] in selecting domain name for my next programming blog
Hey guysI am a software developer and would like to create a blog about mean stack JavaScript application, nodejs frameworks tutorials etc. Already Spent a day just brainstorming and came up with few domains which are available but not sure which one to choose feeling stuckHere is my list101node.com, isimplycode.com, isimplydevelop.com, instaprogrammer.com, activeprogrammer.com, Meanprogrammer.comThanks in advance
Submitted June 17, 2018 at 12:01PM by banna2
Submitted June 17, 2018 at 12:01PM by banna2
Saturday, 16 June 2018
Real life authentication
Folks, what are you using for authentication on your projects? Passport? Other package? Custom built? Is this project already in production? Do you recommend it?I am thinking about my next project and got curious.Thanks!
Submitted June 16, 2018 at 06:44PM by tocreatethings
Submitted June 16, 2018 at 06:44PM by tocreatethings
How can I debug my Express app and find out why it's hanging?
I'm using Express. When I try to submit a POST request to "/users/new" my app hangs. My guess is that it has something to do with some middleware I'm using, but I'm not sure which one. I have checked all my custom middleware and none of them seem to be the issue.The other middleware I'm using are: cookie-parser, express-session, express-flash, and passport for auth.If you're interested in lending a hand, here's the GitHub repo.Otherwise, how can I debug this? I'm kind of at a loss as to how I might pin the issue down. Registration was working fine before adding passport, but I've checked my config/passport.js meticulously and found no issues.tl;dr - how can I track down what's causing my app to hang?
Submitted June 16, 2018 at 05:39PM by akxdev
Submitted June 16, 2018 at 05:39PM by akxdev
Just finished Rollup plugin which shows errors as system notifications
https://ift.tt/2JPdCK1
Submitted June 16, 2018 at 04:30PM by KenRmk
Submitted June 16, 2018 at 04:30PM by KenRmk
Succeeded into creating an authentification system for a custom-built CMS today!
Coming from a pure front-end work, I feel so happy! It may be small for some of you but it's such a huge milestone for me! Been trying so hard for the last month but I know understand the basics of async/promises/err handling :) feels so good
Submitted June 16, 2018 at 03:31PM by Tefrick
Submitted June 16, 2018 at 03:31PM by Tefrick
Trying to run "npm-windows-upgrade" but have a problem with "Set-ExectutionPolicy Unrestricted"
So I want to update my Node via the command line, but when I try the "Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force" command, cmd says "'Set-ExecutionPolicy' is not recognized as an internal or external command, operable program or batch file".I am running cmd as admin of course, I have no clue what I do wrong. Help is hugely appreciated.
Submitted June 16, 2018 at 11:42AM by Do_not_dare_give_up
Submitted June 16, 2018 at 11:42AM by Do_not_dare_give_up
Web apps using node js
Can anyone recommend me which node framework is more usually used for web apps?
Submitted June 16, 2018 at 09:33AM by WHuangz
Submitted June 16, 2018 at 09:33AM by WHuangz
Making a very small application: Is Electron/NW.js worth it? Can I do ANYTHING else?
Alright, let's face it. Anytime you want to make a node app all you can hear about is electron, nw.js, electron again, did you hear about electron?, YOU SHOULD USE ELECTRON!. And, quite frankly, Electron is a big disappointment. Personally, when I go to make an application I don't plan on making a big application like Discord or Game Dev Tycoon if you're into that stuff. What I'm looking for is something that makes everyone's else's life easier.Before I go into the issues with Electron and the alternatives, let me go into my use case. I want to write a cross-platform Minecraft launcher (please, I don't want to hear any comments like "there's too many" or "why Minecraft" or "that's a kids game" or ANYTHING RELATED. I DO NOT CARE.) I would write it in Java, but I have had issues with that (and quite frankly just don't want to learn it) that I will explain further down. I need this Minecraft Launcher to be able to do a few things: Connect and download files to and from the internet (what can't do this?), modify files on a user's system and be able to launch Java, and have a good-looking interface to compete with others like TechnicLauncher, ATLauncher, and even the Vanilla Launcher itself (the twitch launcher doesn't count :/).With that said, it's time to continue. My biggest disappointment with Electron is, well, these:~ RAM USAGE! Every Electron app I have used (Including VS-CODE) uses a good 200-400 MB of RAM. And that doesn't sound quite bad until you need your application to be able to run on low-end machines. Uh oh! You've run into an issue. Only 4 GB of RAM in 2018? Yes, this is a thing, and it's quite common. More than you'd realise. 4 GB of RAM allows you to, well, run Windows, Discord, maybe Google Chrome and VS Code and then that's pretty much it. Electron is not a good solution, it's a workaround to a better solution. Just going with, "It's fine, everyone can handle it" will result in unexpected results. Downloading a version of chromium and node for every application is ridiculous. Imagine we have 15 different applications we use each using 400 MB of RAM. That's 6 GB, which is going over our 4 GB limit as well as barley matching many machines today (I still see laptops for over 200$ with only 6 GB of RAM). This is unacceptable.~ FILE SIZE! You know what? Call me picky, but this annoys me when others say "oh but 50-100 MB is 0.00000000001% of many HDD's today!" You're right. Disk space is not the issue. It's internet speed. I want my users to be able to download this (reminder, SMALL-USE) application fast! And, as many consider whining, many have internet speeds of unacceptable but unavoidable levels. I know a person who has 512 KBPS download. Why? Because CenturyLink says "fu" to their customers in that area and refuses to sell them anything higher. No Xfinity. No satellite-based ones. That is the only option in their area. So, with 512 KBPS you can expect a good 30-50 minutes waiting for this application to download. 200 MB application because you didn't bother zipping it? Well you'll be here for a good hour and a half. Unacceptable.~ IMPLEMENTATION! Okay, I get it, bundling chromium and node together in one package makes versioning easier for developers and makes it much easier to not have to worry about outdated applications. But is this seriously the best idea? Most machines nowadays have Java installed on them, and nobody actually seems to mind. I see many people online posting "but I don't want to have to install one thing to run this application", and I can see their point. With many different versions of "back-end" helpers, it can be an issue. But you don't see that stopping developers and users from using it. The issue with Java is that it's more used for large scale applications like Minecraft. It's also, ignore my "whining", personally much harder to use.These are my main three issues with Electron. Now, let me talk about some alternatives that I have an issue with:~ NW.js! This is essentially Electron, just made differently. It still has filesize issues and RAM usage issues.~ Electrino! IS dead. Unmaintained. So, I found this in their issues...~ Quark (or whatever it's called, to lazy to check my browsing history rn)! This project seems like it will be the best alternative in this list so far. The roadmap for it looks amazing for how big of a project it is (although we'll see how easy it is for it to go through) and I can't wait for it to come out. Unfortunately, I have already gathered a team and gotten the basics down in Node.js and would like to begin work fairly soon. I have been hyping it up a little.~ node-qt! This one looks amazing, but seems to be completely unmaintained and outdated (last commit (essentially) 6 years ago? wow).~ Yue! Another one that looks amazing and I might end up trying, but I have not heard good things and (I haven't done much research into this one) looks as if it might not have the abilities I need it to. I have not checked file size or RAM usage.~ node-webui (or something like that, had to do with opengl)! This one looks like a good idea but I'm not sure if I want to go full native-level OpenGL.With that out of the way, let me explain why I don't want to go into other languages. Quite frankly, the biggest reason of all is that due to the way I work (and motivation for pastime projects), I lose interest in doing a project quite quickly if I am not able to execute it soon using the knowledge I know about the current language. And, in the end, it boils down to "I don't want to learn another language." Yes, I want to learn C++, C#, and similar but I have had so many issues transferring and getting used to those versus Node.js. Node.js just seems so easy to use, quick to set up, and has everything that I'd need. I don't know, this may just be me having issues learning new languages but here's some reasons why I don't want to learn specific ones:~ Python! I hate the layout. Absolutely hate it. There is no way I will ever try and learn a language that is tab-based. And yes, I've seen projects like python-brackets (if that's even what it's called), but it was very hard to learn for a beginner and in the end I threw my hands up and gave up.~ Java! I'm making a Launcher for Minecraft, why would I not use this? Well, I'd have to learn many different styles and ways to code Java. I'm not new to the language at all, in fact I am trying to get into Minecraft Modding at this point which is helping me learn Gradle. But every GUI library I try and find for it either is extremely difficult to learn or is hard to use/make better looking than a Windows 95 program.~ C++/C#! I actually truly do want to learn these, but I have had the hardest time trying to find tutorials and similar for them. Everything I've tried is difficult to use, or every tutorial I've found ends at simple logging to console and math operations (some get into cmd-user input). I have not found one tutorial that is for beginners, and transforms into GUI.~ Go! I just straight up don't want to learn it. I haven't bothered looking for tutorials but from what I've seen it looks very similar to JavaScript but in a way that makes it look weirder and (imo) stupider to use. And, while I haven't checked, I don't believe it has a huge library of modules.Finally, I just want to state one quick point. I have spent months actually searching, going through pages checked tutorials and articles and trying out other languages, as well as giving many a shot trying to learn a couple even attempting to make programs and stuff out of them. But in the end, none of it was as easy to use, maintainable and readable as Node.js. And everything I've found for Node.js has one of the three listed issues I have with Electron or is outdated, unstable, or unmaintained / not completed. So, as you can see, I really do have my heart set on Node.js.So, in the end, I come to Reddit. I tried Quora, but I am not giving them my real name. I knew I'd just get yelled at on StackOverflow as I have done many times. I don't know how many people will read this (if any), but if you have please, I am begging you, do you know of ANY alternatives to Electron that match the given requirements above. Months of research, searching, and digging have gotten me nowhere. Is there even anything out there that is for Node.js and matches my requirements? If so, is it usable? Maintained? And most importantly, cross-platform?
Submitted June 16, 2018 at 08:38AM by FireController1847
Submitted June 16, 2018 at 08:38AM by FireController1847
Friday, 15 June 2018
How do I relate an entry in node.green to an explanation of what that entry means? Because " var ' " is really cryptic.
https://ift.tt/2LQ2jlB
Submitted June 15, 2018 at 07:51PM by derGropenfuhrer
Submitted June 15, 2018 at 07:51PM by derGropenfuhrer
How to build 2,000 REST APIs in a second ! (Node.js + Mysql)
https://ift.tt/2JwyolB
Submitted June 15, 2018 at 05:40PM by o1lab
Submitted June 15, 2018 at 05:40PM by o1lab
New Ebook: Mastering Async/Await
https://ift.tt/2JEbKI4
Submitted June 15, 2018 at 04:54PM by code_barbarian
Submitted June 15, 2018 at 04:54PM by code_barbarian
🔒 Generate HTML reports for NPM Audit
https://ift.tt/2sXLKNw
Submitted June 15, 2018 at 03:45PM by nprail
Submitted June 15, 2018 at 03:45PM by nprail
How to redirect to correct client route after authentication with Passport (react, react-router, express, passport) ?
I'm creating a webapp with NodeJS/Express as the backend and React as the frontend. For authentication I'm using passport-local strategy. I'm following this tutorial to implement it. As in the tutorial he use pug it's easy to redirect the pages as it's done via routing on the server. But as for a react app, routing is done in the client (with react-router) I find it difficult to redirect to a specific page (Component) when the authentication is done. How can I achieve that ? Is there any tutorial that I can follow and get an understanding about this ?
Submitted June 15, 2018 at 02:43PM by sp3co92
Submitted June 15, 2018 at 02:43PM by sp3co92
Zero-config Node.js + TypeScript project with typescript-node-scripts
Hey guys, I've been working on something like `create-react-app` but for Node.js projects and TypeScript.Would appreciate if you guys would check it out and let me know what you think!https://ift.tt/2JQJzFc
Submitted June 15, 2018 at 02:06PM by liangchun
Submitted June 15, 2018 at 02:06PM by liangchun
Lets build express from scratch
I wanted to share something that I worked on for the last 3 days:https://ift.tt/2HR2URM contains the tutorial to create express from scratch (still in progress). I hope it will help others as well who want to dig deep into express and how it works.Thanks!
Submitted June 15, 2018 at 02:19PM by antoaravinth
Submitted June 15, 2018 at 02:19PM by antoaravinth
Fluent Netcat API, ported in Node.js :)
https://ift.tt/2raitwg
Submitted June 15, 2018 at 01:42PM by roccomusolino
Submitted June 15, 2018 at 01:42PM by roccomusolino
Extracting POST data with Node.js
https://ift.tt/2HQB87G
Submitted June 15, 2018 at 11:12AM by tpiros
Submitted June 15, 2018 at 11:12AM by tpiros
Things to consider when outsourcing to a Node JS Development Company
https://ift.tt/2HRNuN0
Submitted June 15, 2018 at 01:25PM by ThirdRockTechkno1
Submitted June 15, 2018 at 01:25PM by ThirdRockTechkno1
How to move whole data from one DB to another?
So question is that. I was using mongo for a long time and recently I started using postgre, and i really like it. And i was wondering if there is nay way to transfer whole database from mongo to postgre? I mean convert it since one is nosql and another is sql database.. sorry if its silly question but i have my own website kinda like hobby project which has good amount of data in it.
Submitted June 15, 2018 at 09:57AM by warchild4l
Submitted June 15, 2018 at 09:57AM by warchild4l
How do I get more involved with my company’s node infrastructure?
So I just graduated and joined as as a frontend engineer to a company that uses a node/react stack. While I love building up features and making our website come to life, I’m also quite interested in nodejs as a backend and how webpack/babel do their magic.I really want to acquire the knowledge that will me get a better understanding of how our web app works behind the scenes so that I can help improve it and maybe one day even help fix things if somethings breaks.However, when I look at our webpack configs and everything to do with how our app is built I feel really lost. There’s just so many files it seems and even though Ive worked with node for some of my personal projects, I feel like i don’t know enough to understand our seemingly complex structure. Even just looking through the scripts in our package.json is confusing for me.There’s only a handful of people in my company it seems that really know how our node infrastructure works and I want to eventually join that club. What’s the best way for me to become more familiar with how larger production node systems work so that I feel more comfortable when being on that side of things? Should I just watch pluralsight tutorials? Read articles? Brute force looking through my company’s repositories? Thanks in advance!
Submitted June 15, 2018 at 09:35AM by StraightZlat
Submitted June 15, 2018 at 09:35AM by StraightZlat
Thursday, 14 June 2018
Free Video Tutorial: Angular 6 – MEAN Stack Crash Course
https://ift.tt/2sWSOKt
Submitted June 14, 2018 at 05:42PM by codingthesmartway
Submitted June 14, 2018 at 05:42PM by codingthesmartway
We added Node.js 10 support in our online IDE and we would love to listen to your feedback
https://ift.tt/2ycW6yi
Submitted June 14, 2018 at 05:52PM by pkasid
Submitted June 14, 2018 at 05:52PM by pkasid
Cluster mode with regular scripts?
I am currently using cluster mode for http services. I also have scheduler/cron script which generates a lot of excel reports periodically.Is there a way to run such node scripts in cluster mode distributing work to multiple CPUs?Problem is that I dont want to simply run multiple instances since it will cause duplicate report generation. There should be a supervisor distributing and collecting the work.
Submitted June 14, 2018 at 02:37PM by cemremengu
Submitted June 14, 2018 at 02:37PM by cemremengu
Help me understand event loop better
Hey! I was reading this https://ift.tt/2jMw5hm dock and found this table ┌───────────────────────────┐ ┌─>│ timers │ │ └─────────────┬─────────────┘ │ ┌─────────────┴─────────────┐ │ │ pending callbacks │ │ └─────────────┬─────────────┘ │ ┌─────────────┴─────────────┐ │ │ idle, prepare │ │ └─────────────┬─────────────┘ ┌───────────────┐ │ ┌─────────────┴─────────────┐ │ incoming: │ │ │ poll │<─────┤ connections, │ │ └─────────────┬─────────────┘ │ data, etc. │ │ ┌─────────────┴─────────────┐ └───────────────┘ │ │ check │ │ └─────────────┬─────────────┘ │ ┌─────────────┴─────────────┐ └──┤ close callbacks │ └───────────────────────────┘ And description:Phases Overview * timers: this phase executes callbacks scheduled by setTimeout() and setInterval().pending callbacks: executes I/O callbacks deferred to the next loop iteration.idle, prepare: only used internally.poll: retrieve new I/O events; execute I/O related callbacks (almost all with the exception of close callbacks, the ones scheduled by timers, and setImmediate()); node will block here when appropriate.check: setImmediate() callbacks are invoked here.close callbacks: some close callbacks, e.g. socket.on('close', ...).If i understand correctly, callbacks should be invoked in ordertimers(setTimeout in my case)regular callbacks(promises too)setImmediate callbackson('close') callbacksBut when i run this code'use strict'; let dataHolder = null; const someAsyncFn = () => Promise.resolve({ data: 42 }); someAsyncFn().then((data) => dataHolder = data); console.log('Just data:', dataHolder); process.nextTick(() => console.log('process.nextTick:', dataHolder)); setTimeout(() => console.log('setTimeout:', dataHolder), 0); setImmediate(() => console.log('setImmediate:', dataHolder)); I get resultsJust data: null process.nextTick: null setTimeout: { data: 42 } setImmediate: { data: 42 } This the part i don't get. Everything makes sense, but the part when is executed after promise callback. Should not setTimeout be executed before promise callback, based on the table above(timers go first and then pending callbacks)?Thanks!
Submitted June 14, 2018 at 03:26PM by SandOfTheEarth
Submitted June 14, 2018 at 03:26PM by SandOfTheEarth
Why should I use mongoDB and not mysql with node?
I want to build users system in node.js, why everyone in recommend to use mongoDB and not mySQL?
Submitted June 14, 2018 at 03:13PM by JordManXx
Submitted June 14, 2018 at 03:13PM by JordManXx
Why It’s Important to Try and Break Your Serverless Application
https://ift.tt/2JK5nPA
Submitted June 14, 2018 at 12:59PM by nshapira
Submitted June 14, 2018 at 12:59PM by nshapira
How to Run Your ADAMANT Node on Ubuntu.
https://ift.tt/2Mn9t1H
Submitted June 14, 2018 at 09:31AM by Ruebor
Submitted June 14, 2018 at 09:31AM by Ruebor
Errors best practices
Hi everyone, what are the best practices for error handling in Node.js?I am building a web app and I am wondering:Should I just use the Native Error class, or should I extend that for every kind of error I want?In a web app I have a lot of different routes and all of them may raise an error. What is the best practice as far as where to deal with these errors? Do I answer a client as soon as I encounter an error, or is it better to next the error until an error middleware?By default the error class accepts just a string message. What about code, Http Status codes etc?Thanks
Submitted June 14, 2018 at 09:14AM by honestserpent
Submitted June 14, 2018 at 09:14AM by honestserpent
Wednesday, 13 June 2018
The GridDB Node.JS client is now available on GitHub
https://twitter.com/GridDBCommunity/status/1006956515008245760
Submitted June 13, 2018 at 06:54PM by IllegalThoughts
Submitted June 13, 2018 at 06:54PM by IllegalThoughts
People to Watch If You're a Node.js Developer
https://ift.tt/2l8raG4
Submitted June 13, 2018 at 03:26PM by estatarde
Submitted June 13, 2018 at 03:26PM by estatarde
What's the best express template engine?
I've been using PUG but recently found out that it is rather slow (not sure how accurate this is. Most results were from 4 years ago). If that is still the case, what is the most performant express supported template engine? Thanks.
Submitted June 13, 2018 at 01:55PM by kishichi
Submitted June 13, 2018 at 01:55PM by kishichi
fast-inject: A lightweight dependency injection container for Node.js
https://ift.tt/2sPhbtt
Submitted June 13, 2018 at 12:58PM by benthepoet
Submitted June 13, 2018 at 12:58PM by benthepoet
MEAN stack learning rythm/learning curve?
Hi. I've started with MEAN stack, focusing in node, about 2 months ago. And I feel somehow I'm going slowly?So far in these 2 months I've done/learnt this:-Express (memorized the whole API just for fun).-The basics of node (npm, events, routing...)-The basics of Angular (just binding, modeling, setting up controllers, not much more)-How to setup a a DB and creating models and schemas with Mongoose, validating them, populating, relating collections... and using the database to create different CRUD thingies.-The basics of Oauth and passport (I can make an app that authenticates with FB, twitter, linkedin...).-Some websocket stuff (enough to make simple chatrooms).-How to setup a REST api (never did that before).-How to tinker with EJS in html templates.-Testing with mocha, chai, sinon (in some depth all of them) and now starting with TDD. Learnt most common patterns for testing in different use cases (CRUD, routing, DB queries, models...).-Combining all the above to create basic CRUD sites (users posting posts and threads for example), with Oauth login, data validation, with some frontend logic (with Angular), developed with TDD methodology.Yet I feel like I have impostor syndrome. Currently I'm dedicating 9-10 hours a day to this stack, so I feel I should be more advanced with such dedication.Is this a proper pace for 2 months or should I push harder? how was your learning? What tips or resources could you give me to accelerate my learning?Sorry if this question is not appropriate for this place. Will delete if needed.
Submitted June 13, 2018 at 11:36AM by NodeNoodle
Submitted June 13, 2018 at 11:36AM by NodeNoodle
Getting Started With Ripple (XRP) and Node.js
https://ift.tt/2saM5v9
Submitted June 13, 2018 at 08:34AM by r-wabbit
Submitted June 13, 2018 at 08:34AM by r-wabbit
Sql server Compac issue
How to Sql server DB script run in Sql server compact DB
Submitted June 13, 2018 at 08:22AM by ThinDescription
Submitted June 13, 2018 at 08:22AM by ThinDescription
Tuesday, 12 June 2018
Deploy Node.js to Google App Engine within Seconds
https://ift.tt/2HHOwel
Submitted June 12, 2018 at 06:27PM by fhinkel
Submitted June 12, 2018 at 06:27PM by fhinkel
Reddit, help me estimate price for the project
I am about to develop NodeJS chatbot for a restaurant in center of city. I am going to offer 2 versions:Simple chat bot offering few features, menu, locations and some FAQ.1 + Reservations.I would like to give numbers to the employer, however I have no experience in estimating projects, please help :)
Submitted June 12, 2018 at 05:33PM by Pavle93
Submitted June 12, 2018 at 05:33PM by Pavle93
Announcing winston@3.0.0
https://ift.tt/2y50VJL
Submitted June 12, 2018 at 05:54PM by gorgerson
Submitted June 12, 2018 at 05:54PM by gorgerson
Introducing Adonis-Box - A simple Vagrant box in the vein of Homestead and Scotch.box for developing AdonisJS applications.
https://ift.tt/2MmtW71
Submitted June 12, 2018 at 05:04PM by Bumpynuckz
Submitted June 12, 2018 at 05:04PM by Bumpynuckz
Protecting Node.js Applications from Zip Slip
https://ift.tt/2y4Hf8O
Submitted June 12, 2018 at 05:05PM by nucleocide
Submitted June 12, 2018 at 05:05PM by nucleocide
New to Node
Hi Guys,Just wondering if you would be able to point me at some good resources for learning Node from scratch? I am a beginner Web Developer and am currently watching some of the tutorials available on New Boston. Wondering if you can recommend some other good resources for a beginner to learn Node (maybe something with examples that you can work towards!). Any help would be much appreciated :)
Submitted June 12, 2018 at 03:39PM by malikpol
Submitted June 12, 2018 at 03:39PM by malikpol
Keeping Node.js Fast: Tools, Techniques, And Tips For Making High-Performance Node.js Servers
https://ift.tt/2xQHq7F
Submitted June 12, 2018 at 05:15PM by mariuz
Submitted June 12, 2018 at 05:15PM by mariuz
How many packages can you add using npm?
I'm a beginner in node, and I see that people add all sorts of packages using npm.Is there a drawback to adding lots of packages? Because I know that you can add these libraries using the script tag, but adding many libraries will slow the website down.Does it have the same effect when adding lots of packages in node?
Submitted June 12, 2018 at 02:08PM by Chr0noN
Submitted June 12, 2018 at 02:08PM by Chr0noN
How often to update node for Angular project
Hi, I'm a beginner with both Node and Angular, and I've been updating my Angular project regularly. However, my node is on LTS v8.9.4 for some time, and node seems to be getting updates very regularly. How often should one update node, and should I update it for my Angular project? I'm not sure how Angular and node depend on each other (besides using npm to install new packages)?
Submitted June 12, 2018 at 12:52PM by gitnik
Submitted June 12, 2018 at 12:52PM by gitnik
Express: Forward custom headers received from client to microservice server
HiI'm developing an an Express server that aggregates data from multiple microservices (by calling multiple APIs) to give client an aggregated response - so that the client does not need to make multiple API calls and that can be handled by the aggregator Express server.Now, the client sends some custom header like for auth, device info (for logging). These headers are processed by the microservices to authenticate requests, do some logging etc. So, the aggregator Express server just needs to pass along these custom headers while making API call to the microservice.My question is what is a good approach to pass received headers to an upstream server. Passing `req.headers` from router to every function right to my apiService (where I put my http request method calls) seems too repititive and dirty in code.Does some global request level context exists in Express, so I can avoid passing the req object around?I know global variables are evil, but passing around req object everywhere also just doesn't feel right.Please share what you feel is rigth to do in this scenario. Also share your experience if you have come across the same problem before.Thanks. Any help is much appreciated!
Submitted June 12, 2018 at 12:12PM by manishbhatt94
Submitted June 12, 2018 at 12:12PM by manishbhatt94
Testing async cross-service flow
How would you go about e2e testing a data pipeline flow? I have IoT style system with multiple autonomous dockerized components that interact via message queue, handle incoming events, process it, apply few business rules and save to DB. Then the end user can search for data. I'm looking to not only test each component in isolation rather ensure that the entire flow works as well - how would you implement such end to end tests?
Submitted June 12, 2018 at 11:23AM by yonatannn
Submitted June 12, 2018 at 11:23AM by yonatannn
Monday, 11 June 2018
ndejs library xlsx to read write spredsheets
Hey guys , came across this xlsx package , was wondering if any one has tried it ?Wanted to see if xlsx could be used to move a row of data from one tab to another in a spreadsheet?thanks in advance.
Submitted June 11, 2018 at 06:18PM by Zeneyo
Submitted June 11, 2018 at 06:18PM by Zeneyo
New Release! Generate REST APIs with ExpressJS and Swagger - features automatic request validation, interactive api doc, and more.
https://ift.tt/2t1IlMc
Submitted June 11, 2018 at 05:57PM by coracarm
Submitted June 11, 2018 at 05:57PM by coracarm
Common Node.js Attack Vectors: The Dangers of Malicious Modules
https://ift.tt/2JA3MeZ
Submitted June 11, 2018 at 06:02PM by nucleocide
Submitted June 11, 2018 at 06:02PM by nucleocide
Building a Cellular Connected Raspberry Pi Fax Machine with Node.js
https://ift.tt/2l3QwEI
Submitted June 11, 2018 at 03:13PM by makaimc
Submitted June 11, 2018 at 03:13PM by makaimc
How to create a monitoring server and display the differences?
Basically, I am creating a server that monitors JSON array outputs from another server and display the differences the next time it gets a new value. The server uses axios to get the "currPoll" with timer setInterval is 10 seconds to get the current value and compare to the previous value (prevPoll).I tried using global variables but I am unable to preserve the previous array to make a comparison to the current array. Can someone point out how do i keep "prevPoll" so I can reuse it to compare with "currPoll" and display the differences every 10 seconds?prevPoll = [ ]; currPoll = [ ]; differences = [ ] ;function getValidPoll() { axios.get('localhost:1050') { .then(function(response){ currPoll = response.data; return currPoll; }).then((currPoll) { for(var i in currPoll) { if(!prevPoll.hasOwnProperty(key) || currPoll[key] !== prevPoll[key]) { differences[key] = currPoll[key]; } } return differences; }).catch(error => { console.log(error); }); }var interval = setInterval(getValidPoll, 10000);
Submitted June 11, 2018 at 01:05PM by markpsp
Submitted June 11, 2018 at 01:05PM by markpsp
I ❤ #javascript: Can (a ==1 && a== 2 && a==3) ever evaluate to true in JS?
https://www.youtube.com/watch?v=pfo5nyDpZsU
Submitted June 11, 2018 at 12:11PM by ginger-julia
Submitted June 11, 2018 at 12:11PM by ginger-julia
Deleting an Item From MongoDB Mongoose By User Permission -Can anyone have a look and let me know if I can optimize the code?
https://ift.tt/2HAGwvL
Submitted June 11, 2018 at 10:17AM by tamalweb
Submitted June 11, 2018 at 10:17AM by tamalweb
Easy way to organize your icons using SVGs in Angular 5 - Medium
https://ift.tt/2y43oEa
Submitted June 11, 2018 at 09:37AM by Fewthp
Submitted June 11, 2018 at 09:37AM by Fewthp
App.get vs router.get
Hi what is the difference between those 2?
Submitted June 11, 2018 at 10:10AM by everek123
Submitted June 11, 2018 at 10:10AM by everek123
Sunday, 10 June 2018
Book about system design
I want to read a good book about design patterns for systems. Preferably a book where Nodejs is in focus. But any other language is also ok. It is the design patterns I am after.Any suggestions?
Submitted June 10, 2018 at 05:07PM by kr1stofferk
Submitted June 10, 2018 at 05:07PM by kr1stofferk
Tutorial - Get started with AWS Lambda and Node.js
https://ift.tt/2l0Vxy7
Submitted June 10, 2018 at 03:25PM by adnanrahic
Submitted June 10, 2018 at 03:25PM by adnanrahic
Saturday, 9 June 2018
Building a Post Scheduler for Facebook Pages with Node.js and React
https://ift.tt/2xZY7O8
Submitted June 09, 2018 at 05:35PM by waleed_ahmad
Submitted June 09, 2018 at 05:35PM by waleed_ahmad
I created an interactive CLI to help you add licenses to your open source projects
https://ift.tt/2MdLh1O
Submitted June 09, 2018 at 04:00PM by MihirChaturvedi
Submitted June 09, 2018 at 04:00PM by MihirChaturvedi
How to get the real type of any JavaScript variable
https://ift.tt/2HzniGW
Submitted June 09, 2018 at 02:56PM by oprearocks
Submitted June 09, 2018 at 02:56PM by oprearocks
[x-post /r/javascript] How to get the real type of any JavaScript variable
https://ift.tt/2sJHJfr
Submitted June 09, 2018 at 02:56PM by oprearocks
Submitted June 09, 2018 at 02:56PM by oprearocks
Looking for an express module that will validate input and respond with default http status codes
Similarly to how graphQL does it all for you with default error messages etc. I found express-jsonshema but it does not make assumptions on http codes
Submitted June 09, 2018 at 09:44AM by ThatBriandude
Submitted June 09, 2018 at 09:44AM by ThatBriandude
Friday, 8 June 2018
What's this black magic fuckery?
So I've been working on this nodejs project and some weird shit is going on, some of my files are automatically appended with such statements:import { create } from "gl-matrix/src/gl-matrix/mat3"; orimport { copy } from "gl-matrix/src/gl-matrix/mat2d"; I checked out the library and library itself is weird with blank functions and all, so what's going on here?EDIT: I'm using Visual studio code.
Submitted June 08, 2018 at 07:08PM by mind_bind
Submitted June 08, 2018 at 07:08PM by mind_bind
npm showing 0 weekly downloads for all packages
https://ift.tt/1F1jKKB
Submitted June 08, 2018 at 05:49PM by kapv89
Submitted June 08, 2018 at 05:49PM by kapv89
[Question] How can prevent a route from being accessed via the back button?
So I have a form("route1") that redirects to another route("route2"), using the form output as the parameters for this route. Once the form(different form from the first, located in route2) is completed and submitted on "route2" it redirects to route3. I would like to disable any way to navigate back to "route2" through the back button or history, as it breaks the application.Any insight as to how this could be accomplished would be greatly appreciated.
Submitted June 08, 2018 at 05:54PM by onlyslavesobey
Submitted June 08, 2018 at 05:54PM by onlyslavesobey
Setting up Express + Redis using Docker Compose
https://ift.tt/2HxNMZg
Submitted June 08, 2018 at 04:36PM by hugo__df
Submitted June 08, 2018 at 04:36PM by hugo__df
Modular Graphql
https://youtu.be/iDTpCiYQctg
Submitted June 08, 2018 at 03:22PM by MCSajjadH
Submitted June 08, 2018 at 03:22PM by MCSajjadH
Please help! Really frustrated with koa-mongo
Lmk if this is the wrong sub for this, but I'm trying to get a super simple task going using koa-mongo and I can't figure it out.I'm sending a simple json object to my koa server, like {foo: 'bar'}, and I want to be able to perform CRUD operations in the DB using the module.The example in the github page is nonsensical to me; for example it has the line const result = await ctx.mongo.db('test').collection('users').insert({ name: 'haha' }); but ctx.mongo does not even have a "db" property that my IDE recognizes and I can't find it in the source code. Can someone please break down how the Example code from the github page works?How do you simple store a json k:v in the DB and then pull it?Thanks so much.
Submitted June 08, 2018 at 01:17PM by animanicats
Submitted June 08, 2018 at 01:17PM by animanicats
Building REST services with Serverless framework, in Node.js, AWS Lambda and DynamoDB
https://ift.tt/2xWyMVa
Submitted June 08, 2018 at 02:20PM by 4DaftPanda
Submitted June 08, 2018 at 02:20PM by 4DaftPanda
Node.js Top 10 Articles for the Past Month (v.June 2018)
https://ift.tt/2JmQKph
Submitted June 08, 2018 at 02:14PM by Rajnishro
Submitted June 08, 2018 at 02:14PM by Rajnishro
How We Improved Our Raspberry Pi-based Smart Office with Node.js
https://ift.tt/2JnSZ7E
Submitted June 08, 2018 at 11:55AM by estatarde
Submitted June 08, 2018 at 11:55AM by estatarde
Any good full stack web app example using node.js?
I'm a nodeJS amateur who wishes to learn web app development using the said technology. Are there any good code examples out there that demostrates a full tech stack for web app developments? It would definitely be a great jumpstart for coders to look at. 😄
Submitted June 08, 2018 at 10:38AM by mettsoft
Submitted June 08, 2018 at 10:38AM by mettsoft
Thursday, 7 June 2018
Build, Deploy and Publish an API Using Code.xyz and Node.js in 6 Easy Steps
https://ift.tt/2sOtBRt
Submitted June 07, 2018 at 05:44PM by JanethL
Submitted June 07, 2018 at 05:44PM by JanethL
Any Node programmers interested in implementing the blockchain and syncing parts of Ethereum in Node? Similar to Geth and Parity?
One of the main difficulties with Ethereum is the time, effort and resources needed to have a functioning node that has synced the blockchain from other nodes.I'm interested in writing a system that downloads the blockchain from Geth and Parity nodes, using node.js. I want to avoid coding the Ethereum VM in this project, and use an existing implementation, or a somewhat modified one based on Geth or Parity that interfaces with the node part of the system. (Though writing another EVM in C, C++ or Rust appeals to me, that seems more difficult than necessary to start with).I have some ideas regarding data (not chain) sharding that will improve capabilities relative to Geth and Parity at present. I am also considering how the sharing of Ethereum data can be disconnected from validation and running the VM. Blocks of data could be downloaded and made available as torrents, for example, with validation running on data structures that were extracted from downloaded files that contain many blocks at once.
Submitted June 07, 2018 at 06:53PM by jsgui
Submitted June 07, 2018 at 06:53PM by jsgui
Developing Well-Organized APIs with Node.js, Joi, and Mongo
https://ift.tt/2sEwuVO
Submitted June 07, 2018 at 04:58PM by Ramirond
Submitted June 07, 2018 at 04:58PM by Ramirond
question about paths and published modules
So I made a node module that among other things has a src/ folder, on which a js file references a certain external json file.Said json file is in a different folder than the code calling it, and it is opened using s.readFileSync('../anotherfolder/myfile.json').To clarify, the folder structure would be something likesrc/ mycode.js anotherfolder/ myfile.son The code works, but after I publish the package, the relative route stops working. I'm assuming that this is due to the relative path being calculated in a different manner now? if so, how can I set it so that it works both in the project itself and as a module?
Submitted June 07, 2018 at 04:26PM by kace91
Submitted June 07, 2018 at 04:26PM by kace91
Send your proposal for NodeConf Argentina 2018! We cover your travel and stay
https://ift.tt/2HrKhUl
Submitted June 07, 2018 at 03:39PM by a0viedo
Submitted June 07, 2018 at 03:39PM by a0viedo
Bringing the nodejs/help backlog down by 90% over 2 months, and best practice recommendations for…
https://ift.tt/2sF54it
Submitted June 07, 2018 at 01:59PM by ICYMI_email
Submitted June 07, 2018 at 01:59PM by ICYMI_email
Stock Price Notifications with Mongoose and MongoDB Change Streams
https://ift.tt/2JGblEa
Submitted June 07, 2018 at 02:26PM by code_barbarian
Submitted June 07, 2018 at 02:26PM by code_barbarian
The NodeJS Event Loop - Interesting facts
https://youtu.be/qV8FgRt-HJI
Submitted June 07, 2018 at 12:37PM by crazy_boss_reloaded
Submitted June 07, 2018 at 12:37PM by crazy_boss_reloaded
Claudia.js 5 released with npm5 support and improved packaging of Node.js apps with AWS SAM
https://ift.tt/2Ji2qcZ
Submitted June 07, 2018 at 11:41AM by simalexan
Submitted June 07, 2018 at 11:41AM by simalexan
Nodejs Development Services- Future of Web Development Services
https://ift.tt/2JhrTDe
Submitted June 07, 2018 at 10:13AM by xtreem-solutions
Submitted June 07, 2018 at 10:13AM by xtreem-solutions
Seeking Node JS Development Services? Know These Facts
https://ift.tt/2xNMREg
Submitted June 07, 2018 at 10:18AM by ThirdRockTechkno1
Submitted June 07, 2018 at 10:18AM by ThirdRockTechkno1
To Yarn and Back (to npm) Again
https://ift.tt/2LFHSIT
Submitted June 07, 2018 at 07:29AM by r-wabbit
Submitted June 07, 2018 at 07:29AM by r-wabbit
Wednesday, 6 June 2018
[Question] Requesting and returning/displaying data on clientside without page refresh
I want to make an API call and display that data in a modal when I click a button. I am assuming Ajax is what I need to use but I also didn't want to make my call directly from the client for security reasons. I basically would like to accomplish the following progression without reloading the page:button click > node server sends API request > node server receives data > node server sends data to client > display content in modal.I was thinking the ajax-request package would be where I need to start to accomplish this but the documentation is a little unclear to me so I'm not sure.Any insight would be greatly appreciated.
Submitted June 06, 2018 at 05:56PM by onlyslavesobey
Submitted June 06, 2018 at 05:56PM by onlyslavesobey
10 Things I Regret About Node.js - Ryan Dahl
https://www.youtube.com/watch?v=M3BM9TB-8yA
Submitted June 06, 2018 at 05:24PM by pier25
Submitted June 06, 2018 at 05:24PM by pier25
Is node.js express the same as express.js? I'm confused...
Topic.On tutorials point, as well as webstorm, it's called node.js express. I also see that there's a framework called express.js.I'm just trying to get started with learning node... Please help clear up my confusion!Thanks
Submitted June 06, 2018 at 04:38PM by obi-hope
Submitted June 06, 2018 at 04:38PM by obi-hope
Build a Twelve-Factor Node.js App with Docker
https://ift.tt/2BPR4Wb
Submitted June 06, 2018 at 01:49PM by ICYMI_email
Submitted June 06, 2018 at 01:49PM by ICYMI_email
Feature Flags in NodeJs + React
https://ift.tt/2HqjWFQ
Submitted June 06, 2018 at 01:32PM by clementwalter
Submitted June 06, 2018 at 01:32PM by clementwalter
Subscribe to:
Posts (Atom)