Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,664 members, 7,801,919 topics. Date: Friday, 19 April 2024 at 05:58 AM

Lets Talk Node.js - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Lets Talk Node.js (2018 Views)

Is Node.js A Future??? / Node.js Vs Php / 10 Weeks Of Node.js After 10 Years Of PHP (2) (3) (4)

(1) (Reply) (Go Down)

Lets Talk Node.js by sleepingdemon: 5:42pm On Nov 16, 2015
i think i might have come to a conclusion that most nigerian developers hardly write node js apps, but looking from the perspective of writing in a single base code i.e Javascript front end and backend, i would like us to discuss the node frame works we use, and propably our challenges with them..


for me, i use kraken js which was built ontop of express, and uses dust js as a templating engine.....what of u?
Re: Lets Talk Node.js by Nobody: 7:28am On Nov 17, 2015
We do but not the same way you do, I use it mostly for tasks and watchers not for web
Re: Lets Talk Node.js by sleepingdemon: 8:35am On Nov 17, 2015
pcguru1:
We do but not the same way you do, I use it mostly for tasks and watchers not for web
....thats cool, ever used it for desktop app using app js or atom shells?
Re: Lets Talk Node.js by Nobody: 9:12am On Nov 17, 2015
sleepingdemon:
....thats cool, ever used it for desktop app using app js or atom shells?


Where i work it was considered, but no for now. But when the time comes we will
Re: Lets Talk Node.js by Metalzoa: 9:52am On Nov 17, 2015
I love node.js

Built a desktop app with it. Use it to build backends. Use it for build steps for frontend.

It's an important part of my toolkit.

What about node do you want to talk about?
Re: Lets Talk Node.js by sleepingdemon: 10:47am On Nov 17, 2015
Metalzoa:
I love node.js

Built a desktop app with it. Use it to build backends. Use it for build steps for frontend.

It's an important part of my toolkit.

What about node do you want to talk about?
do u use express a lot or kraken? how easily do u deal with session authentication, passports?
Re: Lets Talk Node.js by Metalzoa: 4:30pm On Nov 17, 2015
sleepingdemon:
do u use express a lot or kraken? how easily do u deal with session authentication, passports?

Personally I prefer dealing directly with Express, but at work we use Sails.js.

Sessions .. I prefer stateless servers, so the session information is in a token. Preferrably a JWT.
Re: Lets Talk Node.js by sleepingdemon: 4:48pm On Nov 17, 2015
pcguru1:



Where i work it was considered, but no for now. But when the time comes we will
ehen, let me dust my credentials and get ready for your company
Re: Lets Talk Node.js by sleepingdemon: 4:49pm On Nov 17, 2015
Metalzoa:


Personally I prefer dealing directly with Express, but at work we use Sails.js.

Sessions .. I prefer stateless servers, so the session information is in a token. Preferrably a JWT.
talking about sails, can u mention any advantage u think it has over kraken, and then, dealing with express directly, it might be more tasking than with frameworks
Re: Lets Talk Node.js by sleepingdemon: 7:16pm On Nov 17, 2015
Metalzoa:


Personally I prefer dealing directly with Express, but at work we use Sails.js.

Sessions .. I prefer stateless servers, so the session information is in a token. Preferrably a JWT.
and yes, please refer me the best host for node js apps
Re: Lets Talk Node.js by Metalzoa: 7:57pm On Nov 17, 2015
sleepingdemon:
talking about sails, can u mention any advantage u think it has over kraken, and then, dealing with express directly, it might be more tasking than with frameworks

I've never used Kraken and I'm not sure I'm fully sold on Sails. Can't defend or condemn either one.

I prefer dealing with a Express directly because I'm a really big fan of composition over convention. I put libraries together rather than lean on a framework

No idea who the best is but I host on heroku.
Re: Lets Talk Node.js by sleepingdemon: 8:45pm On Nov 17, 2015
Metalzoa:


I've never used Kraken and I'm not sure I'm fully sold on Sails. Can't defend or condemn either one.

I prefer dealing with a Express directly because I'm a really big fan of composition over convention. I put libraries together rather than lean on a framework

No idea who the best is but I host on heroku.
just went through sails, and the mere fact that it uses ejs rather than dust for templating is attractive..meaning i get to write javascript like im writing php....
Re: Lets Talk Node.js by JackOfAllTrades: 9:01pm On Nov 17, 2015
I love JavaScript and I fancy nodejs but unfortunately there are no shared server support that I know of, so I'm gonna stick with php for now

1 Like

Re: Lets Talk Node.js by Metalzoa: 4:28am On Nov 18, 2015
sleepingdemon:

just went through sails, and the mere fact that it uses ejs rather than dust for templating is attractive..meaning i get to write javascript like im writing php....

Ever tried using React?

I think trying to do the view layer of your front end without it isn't the wisest choice. It's not a template system but you should consider it for your app's view.

I really like react and I try to explain why it's a good idea. I feel I've failed in my attempts so far, but here's one of the more recent ones.

http://designbymobi.us/why-react-js/
Re: Lets Talk Node.js by sleepingdemon: 7:41am On Nov 18, 2015
Metalzoa:


Ever tried using React?

I think trying to do the view layer of your front end without it isn't the wisest choice. It's not a template system but you should consider it for your app's view.

I really like react and I try to explain why it's a good idea. I feel I've failed in my attempts so far, but here's one of the more recent ones.

http://designbymobi.us/why-react-js/
i guess ill be switching to sails, but i find thier conention a little wierd, mind if i get to contact u along side as i move....ill read up the article on react
Re: Lets Talk Node.js by Nobody: 9:34pm On Nov 18, 2015
Metalzoa:
I love node.js

Built a desktop app with it. Use it to build backends. Use it for build steps for frontend.

It's an important part of my toolkit.

What about node do you want to talk about?

installing express has been hell for me, did everything i know, i still could'nt, how did you installed express.
Re: Lets Talk Node.js by thewebcraft(m): 10:22pm On Nov 18, 2015
sleepingdemon:
i think i might have come to a conclusion that most nigerian developers hardly write node js apps
That's a cliche and very unprofessional of you to say, have nothing to say about Node cause i use it daily.
Re: Lets Talk Node.js by thewebcraft(m): 10:24pm On Nov 18, 2015
sleepingdemon:
i think i might have come to a conclusion that most nigerian developers hardly write node js apps
That's a cliche and very unprofessional of you to say, have nothing to say about Nodejs cause i use it daily.
Re: Lets Talk Node.js by sleepingdemon: 11:35pm On Nov 18, 2015
thewebcraft:

That's a cliche and very unprofessional of you to say, have nothing to say about Nodejs cause i use it daily.
i made mention of most, not all, if we were to do a probability count, well hardly get 25% of sampled developers on that side, besides i could also be wrong....
Re: Lets Talk Node.js by thewebcraft(m): 11:39pm On Nov 18, 2015
sleepingdemon:
i made mention of most, not all, if we were to do a probability count, well hardly get 25% of sampled developers on that side, besides i could also be wrong....
maybe grin
Re: Lets Talk Node.js by Metalzoa: 12:50am On Nov 19, 2015
Ucheernest:


installing express has been hell for me, did everything i know, i still could'nt, how did you installed express.

First step is to install Node, which comes with npm. I think its pretty easy to do even on Windows (which I use).

https://docs.npmjs.com/getting-started/installing-node

After that, create a new project with npm init

c:\nodejs\project-folder> npm init


Follow the prompts and you should have a file in the folder called package.json

Install Express in your new project with this command

c:\nodejs\project-folder> npm install --save express


Your project package.json should now have something like this:

"dependencies": {
"express": "^4.13.3"
}


This means express is now available to be used in your project smiley

A simple way to test if this is working is writing a small js file that calls in express in the project.
I named mine has_express.js and this is the content.

var express = require('express');

if(!express) throw new Error('EXPRESS NOT FOUND');
else console.log('EXPRESS IS ON MY SYSTEM');


Run this command.

c:\nodejs\project-folder> node has_express.js


You should see EXPRESS IS ON MY SYSTEM.

Hope this helps grin
Re: Lets Talk Node.js by Nobody: 8:07am On Nov 19, 2015
Metalzoa:


First step is to install Node, which comes with npm. I think its pretty easy to do even on Windows (which I use).

https://docs.npmjs.com/getting-started/installing-node

After that, create a new project with npm init

c:\nodejs\project-folder> npm init


Follow the prompts and you should have a file in the folder called package.json

Install Express in your new project with this command

c:\nodejs\project-folder> npm install --save express


Your project package.json should now have something like this:

"dependencies": {
"express": "^4.13.3"
}


This means express is now available to be used in your project smiley

A simple way to test if this is working is writing a small js file that calls in express in the project.
I named mine has_express.js and this is the content.

var express = require('express');

if(!express) throw new Error('EXPRESS NOT FOUND');
else console.log('EXPRESS IS ON MY SYSTEM');


Run this command.

c:\nodejs\project-folder> node has_express.js


You should see EXPRESS IS ON MY SYSTEM.

Hope this helps grin

bro, i still got an error, i have got a question, does it require internet to install? cos am thinking that it might be my proxy issue.

Re: Lets Talk Node.js by Metalzoa: 9:12am On Nov 19, 2015
Ucheernest:


bro, i still got an error, i have got a question, does it require internet to install? cos am thinking that it might be my proxy issue.

You need internet for the first time installing any package.

After that, the package is cached on your device so you'll be able to install it on multiple projects even with no internet.

But for the first install, you definitely need internet.
Re: Lets Talk Node.js by Nobody: 11:23am On Nov 19, 2015
Metalzoa:


You need internet for the first time installing any package.

After that, the package is cached on your device so you'll be able to install it on multiple projects even with no internet.

But for the first install, you definitely need internet.
ok bro, and thank you very much.

1 Like

Re: Lets Talk Node.js by Nmeri17: 4:12pm On Jul 18, 2016
^^^ Na wa o! See protocols upon protocols. You even have to manually install packages for each individual project. smh sad

JackOfAllTrades:
I love JavaScript and I fancy nodejs but unfortunately there are no shared server support that I know of, so I'm gonna stick with php for now
Is this still true? shocked

(1) (Reply)

Programmers Needed / I Beg You In The Name Of God Help Me Out Urgently / Help On Php/mysql Queue Process

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 38
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.