Tag : Node JS



Solved Issue - "/usr/bin/env: ‘node’: No such file or directory"

<br/> In this post i want to share one issue that i fetch. When i started working on my react js project first time on my ubuntu 16.04, i installed npm and then after i run bellow command: <pre> npm install -g create-react-app </pre> this way i installed create-react-app then after i created new command using create-react-app commands, so i run bellow command for create new app of reactjs. <pre> create-react-app hello-world </pre> But when i run above command i found one error <strong>"/usr/bin/env: ‘node’: No such file or directory"</strong>. I thought what will be issue, i searched on go.....

By Hardik Savani | February 24, 2017 | | 3488 Viewer | Category : Installation Ubuntu Node JS React JS
READ MORE

How to connect mysql database in node js with example?

Node.js is very popular in Todays for make chat system, real-time notification, real-time developing etc. So, Today, I am going to give you very simple example of How to use MySQL Query in Node JS. If you use node.js then you can see how it is work and there are several driver for different task like redis, socket io, express etc. But Node.js have a driver for MySQL that way we can easily connect with database and you can use select, insert, update and delete sql query. So, in this example i going to give from scratch so if you are beginner and you haven't installed nodejs on your server th.....

By Hardik Savani | September 29, 2016 | | 4659 Viewer | Category : MySql Ubuntu Server SQL Node JS
READ MORE

Laravel 5 - Authenticate user in NodeJS with socket io using JWT.

Today, i am going to show you how to authenticate user node js using JWT and socket io in Laravel 5.3. It is very very important because if you are working with chat application or messengers system etc with user then you have to use JWT token because it is very safe and secure way. If we work on chat module with socket io but someone can easily hack our code. At that time we require to check given JWT token is valid or not using <strong class="path">socketio-jwt</strong> package of Node. socketio-jwt package thorough we can simply authentication with user and identify that token is valid .....

By Hardik Savani | September 25, 2016 | | 22468 Viewer | Category : Laravel Installation Server Node JS Socket.io JWT
READ MORE

Solved - gulp error cannot find module laravel-elixir

If you also find error like "laravel-elixir not found" on gulp then you can install laravel-elixir npm package manually. I also fetch this error when i was new in laravel and working with gulp first time. We can solve laravel-elixir not found error using laravel-elixir nodejs package. So you can run just bellow command and check. First command if you run already then don't require to run. <strong>Command:</strong> <pre class="prettyprint lang-php"> npm install npm install laravel-elixir </pre>

By Hardik Savani | July 22, 2016 | | 4407 Viewer | Category : Laravel Node JS
READ MORE

How to upgrade node.js version in Ubuntu?

In this post i want to share about how to update node version in ubuntu OS. I would like to share this post because i try lot to update my node js package. When i install 0.10.25 nodejs but i want to update nodejs current latest version. At that time i did try lot to upgrade but i can't update my node. I have ubuntu 14.04 OS. One time i was working on native script framework and i need to update nodejs package at that time my Project Manager give me some command for update nodejs current version. I don't know where he found but now my system have latest version of node. So if you also want t.....

By Hardik Savani | April 12, 2016 | | 6349 Viewer | Category : Installation Ubuntu Node JS
READ MORE

How to use foreach object in Nodejs ?

Normally, we does use foreach loop in PHP, JS etc, but when i was working on socket programming at that time i require to use foreach of object in server.js. I did also search on google and try to how to use foreach in Node JS. At last i found to use forEach and solve it. so, let's see following example. <strong >Example</strong> <pre class="prettyprint lang-php"> socket.on("newmessage", function(obj) { obj = JSON.parse(obj); obj.forEach(function(items) { console.log(items.userid); var e = "notify-"+items.userid; io.sockets.emit(e, 1); }); }); </pre>

By Hardik Savani | March 31, 2016 | | 5270 Viewer | Category : PHP Laravel Node JS
READ MORE

    PHP - Infinite Scroll Pagination using JQuery Ajax Example

    PHP - Infinite Scroll Pagination using JQuery Ajax Example

    Open Post

    Laravel 5.4 - send email using Markdown Mailables

    Laravel 5.4 - send email using Markdown Mailables

    Open Post

    How to execute artisan commands from route or controller in Laravel ?

    How to execute artisan commands from route or controller in Laravel ?

    Open Post

    Laravel 5.5 Create Custom Middleware example

    Laravel 5.5 Create Custom Middleware example

    Open Post

    AngularJS - convert comma separated string to array example

    AngularJS - convert comma separated string to array example

    Open Post

    Laravel 5 - Create Dummy Data using tinker factory

    Laravel 5 - Create Dummy Data using tinker factory

    Open Post