How can i add a Custom Translation Middleware to Bot Composer in node js - bot-framework-composer

I looked in the below documentation but was not clear on how to add the middleware in node js template for bot composer
https://learn.microsoft.com/en-us/composer/concept-extend-with-code
Please if anyone can help in achieving the same.
Needs guidance on same

Related

Is frontend better or backend for integration with smart contract (erc721)?

I have developed my ethereum smart contract and I want to integrate it with my web application. But I don't know that is integration with ReactJS a better option or integration with nodejs a better one. Please give suggestions . Also I don't know how to do integration with backend through web3 library so please guide me about that.
When you are creating web3 app , most of the time you are not going to need a backend for that (Although you need a server to host your website) .
Working with and managing smart contracts are very easy at the front-end and there is no need for backend, but if your working on a large scale project , you are definitely going to need a backend for handling complex logics .
Next js is best option for both of that , containing node and react , also no need for manually configuring web server.
Better is next.js. I explained it here: https://ethereum.stackexchange.com/questions/129547/next-js-versus-react-which-to-use-when-for-your-dapp/130040#130040
Not every browser has metamask extension. By using next.js, when our
code is taken and rendered on the server, on the next server we can
reach out to the Ethereum network and do some initial calls like data
fetching, or alist of items in your smart contract. we execute all of
those requests on the server. That means when next.js produces Html
documents to send down to the user browser, it does not matter whether
or not users are using metamask. It does not matter whether or not
they have access to an Ethereum network. Because we already take care
of the data fetching for them. So all the users out there who are not
using metamask are going to see some information on the screen.
You've mentioned that you don't want to switch technologies, and while I agree with NextJS being a good platform to develop dApps on, I suggest you just use your current NodeJS server for anything that isn't web3 related and you use the web3js library from the frontend (your React) which would be very similar to a NextJS app anyway.
This way you don't have to switch technologies.

How to implement login authentication to my Vue NodeJS restful API?

I am new to Stackoverflow so please forgive me if my question is bit difficult to understand. However, background of my problem is following.
I have created a NodeJS RESTful API based on the following tutorial -
https://www.codementor.io/olatundegaruba/nodejs-restful-apis-in-10-minutes-q0sgsfhbd
I have also created a Vue based frontend what I use to display data from database with GET request, POST new data to database and also PATCH/DELETE requests.
I need to create a login/registration system to secure my api endpoints so that the unauthorized person cannot see/delete/modify the content but I have no idea where to start or how to implement it.
My project frontend and backend repositories are visible on:
Frontend - https://github.com/umbluu/mufc-api-fe
Backend - https://github.com/umbluu/mufc-api-be
Can someone please point out some hints/tips how to proceed with my task?

How should I use google api node js client ?

I'm trying to call GA api in a react/webpack/babel project using google-api-nodejs-client. However it doesn't work. I've got multiple error in my console. On the google-api-nodejs-client GitHub's issues I found the following answers about a similar issue :
google-api-nodejs-client is not meant to be used in a browser—it won't
work. googleapis (google-api-nodejs-client) will work in Node.js.
Excluding googleapis from any server-side bundle (just let Node's
module system load it for you) is the best option.
To access Google APIs from a browser, please use the Google API Client
Library for JavaScript (gapi).
I don't really understand it. Can someone explain this differently ?
thanks.

Parse server payments not working

I have an app that used to be on Parse.com and now is migrated to the open source parse server running on elastic beanstalk. The app uses Stripe for payments and everything worked fine before, but after migrating to parse server, the payments are now failing. Does anyone know of something they changed or anyone had a similar problem?
Thanks
I am pretty sure that the module delivered with Parse hosted no longer works on Parse-server. I am sure that Stripe has a node module which you could install and use instead.
Instead of using Cloud Code, create a route in your index.js file to take care of charges. Make a post route and you can call it via jquery post or from a form. I use body-parser in index.js to retreive the post data.

Loopback with i18n support

I'm trying to understand how to add i18n support to loopback which is built on top of express.js.
I've installed i18n-node and have read the express.js documentation. It looks like I don't want a global state of localization because I'll be serving HTTP responses. The i18n-node documentation recommends I attach it to the request object and gives an example.
My problem is that I can't find where/how to add this code into loopback. Everywhere I try to put the app.configuration function it says that method is undefined.
I have a feeling this is a middleware addition that I want to add to the middleware.json file in the routes phase. But I don't know how to do that.
Does anybody know a good way to internationalise a loopback app (server response messages, emails going out etc.)?
As per the documentation on their Github Page. I think the configuration code is best to keep in server/boot/ folder. As these are loaded as the server start and then, can be used by other rest endpoints. Don't forget to add JSON files for translations.
I don't think there are any other requirements as LoopBack is built on top of Express and most of their codes work same.

Resources