How to add scribe client for nodejs app with winston logs - node.js

I have been using winston for logging in my node application.Now I need to setup scribe for aggregating the application logs.I noticed the node-scribe client for node app to interact with scribe client.But my doubt is how to make the existing logs to interact with the scribe client without changing my logging from winston.
Thanks in advance

There's a winston-scribe npm module. Its source code has been removed from github but it's still there in npm registry. It's fairly simple (49 lies of code) and depends on scribe module (hosted on github as node-scribe). Just install it, import the Scribe transport and give it a try.
DISCLAIMER: I haven't tested it but I think it should work.

Related

Feathersjs setting up issue

I am new to featherjs when I run npm install and run by using npm start I am getting the below error. I tried to use the one sample project from github [https://github.com/swina/feathersjs-webpush-notifications][1]
Like the error says, you need a secret (and probably additional) configuration for authentication. This is usually located in config/default.json (or config/<environment>.json). Have a look at the feathers-chat configuration which is the standard configuration generated by the CLI and the recommended way to get started. More information on authentication configuration can be found in the authentication API documentation.

crypto.getCurves is undefined

I am trying to use an oauth helper library called 'openid-client'. I am getting an error that reads in part '(TypeError): getCurves is not a function'. I poke around and find that getCurves is part of an inbuilt module of node.js 'crypto'.
If I console.log(typeOf(crypto.getCurves)) I get undefined. If I console.log(crypto) I see that crypto has many available methods but getCurves is not among them.
I am running node on my macbook and my project is a barebones npx create-react-app app with openid-client installed.
The node documentation outlines a way for determining if crypto support is unavailable, but that does not seem to indicate that crypto is unavailable for me.
I'm not sure why my version of node crypto does not have getCurves. Is there a way to install the correct version? Is there some sort of encryption restriction I am hitting due to OS? Any help appreciated.
node-openid-client is using APIs which are provided by Node and are missing in browser.
Node is being used by CRA as a development tool. App itself is running in browser and can't access Node's API-s, so it doesn't matter which Node version CRA is using.
When built, app is a set of JS files which can be served by a webserver (such as Nginx) directly without using Node at all.
So, this library can't be used with CRA apps.
https://github.com/panva/node-openid-client/issues/218
As you said, crypto is a built-in module, which means that its functionality depends on the version of node.js you have installed (you can check it via node -v from the shell or via console.log(process.version) at runtime).
Node.js API docs say that getCurves() was added in v2.3.0, so make sure your node is more recent than that.

Register, login, logout Website with Node

I'm currently moving on with reading about node. I'm getting through the tutorials well using the command line. However I am thinking ahead and I want to create a simple register, log in and log out website.
Where would I place the node files on a server (all examples I see run from local host:3000)?
What is the best tutorial for creating this type of website from scratch with node?
Thanks in advance!
It doesn't really matter where you put the files on the server. The localhost:3000 bit comes from the fact that your core server file tells the server to listen on that port.
I would recommend using the express-generator from npm. It's pretty versatile and does a lot of the leg work.
Just run the following:
npm install express-generator
After installing, you'll need to just run the following to create a new web app:
express
The details are here: http://expressjs.com/starter/generator.html.
Also, try to read through and understand all of the pre-provided code.

Npm module to stream Twitter API content in a Meteor.js app

I need to make a web app with Meteor.js which allow users to search for a hashtag on twitter and display them in the same page.
I already get the base of the application.
But now, I have a problem. I need to use a npm module to stream the content of the Twitter API.
I've installed that: https://www.npmjs.org/package/node-twitter-api but I don't understrand where I need to put the code.
I've look up for others stuffs, but I don't understand how does it work and how incorporate it in my meteor app.
There are two ways of including npm modules with meteor apps:
Using meteor-npm Meteorite package. (personally recommended): https://www.npmjs.org/package/meteor-npm
Use the native Npm.require provided by Meteor to load the package. Documentation: https://github.com/oortcloud/unofficial-meteor-faq#what-about-npm-node-modules

soundcloud node npm

Is there an official or "blessed" Node.js NPM module for interacting with SoundCloud.
There are a few wrapper API's around. I'm wondering whether there is a favoured one by the community.
Thanks.
There is one.
https://github.com/podviaznikov/soundcloud-node
npm install soundcloud
there is NOT a blessed module for node.js. There is a decent pacakge here: https://github.com/khilnani/soundclouder.js/blob/master/lib/soundclouder.js
It's currently maintained but still pretty basic
I just updated my own Soundcloud NodeJS Api-Wrapper Package: https://www.npmjs.com/package/soundcloud-nodejs-api-wrapper
You can do server side only API communication, which includes data manipulation on the account for the given credentials. No user permission popup window is needed.
So far I did not found any other package for nodejs supporting this.

Resources