using VPS(Ubuntu) to create server using google calendar API authentication failed - linux

So I am doing this project. I'm basically creating this server using task warrior and google calendar API to upload tasks that are made from the terminal to the google calendar.
Originally I did this on my personal computer(OS archlinux) and it worked, but I can't keep my computer running 24/7 so that why I opted of using a VPS. The VPS is running Ubuntu 20.04 without GUI. The same process that I did on my computer I to the server, everything went well until the part where google asked to allow the program to which I got a localhost refuse to connect message.
I'm going to assume that because it isn't my local network it going to refuse the connection.
My question how to allow that connection to be accepted by google? Is it something that I need to add or change in the API setting on google?

Related

Check if my Nodejs server is running remotely

I have a Nodejs server running a website remotely in a Windows 10 machine. But the machine is sometimes turned off and I do not know that the website is down.
I was thinking of creating a Nodejs website and have it run in Heroku that sends a request to my website running in the windows machine every 5 minutes and notify me via email if it does not get a response. However, I wanted to know if there are better options available for situations like these.

How does my laptop work as a web server which will take the data to database 24/7

I recently made a website but I had a doubt about how to make my laptop work as a server and after deploying if I shut down my laptop will the website work the same manner and give data to database in mongodb cloud atlas or will it show website not reached if it does please solve my doubt and give me a solution
If you're not running the node.js server then your website will not be accessible.
Why not deploy to the cloud like Heroku?
if your site is deployed on your machine it will no longer be accessible if you are disconnected from the internet network in any way.

Node Red - Accessing dashboard from remote server

I have a question regarding the Node Red dashboard. I've got my dashboard all set up and working. Now, I want to be able to access the dashboard outside of my local network. Right now I do this through a VNC server. What needs to happen next is that clients need to able to access the dashboard, but they are not getting access to my VNC server of course. I have done my fair amount of Google work. I (somewhat) understand that a service like ngrok (ngrok.com) or dataplicity (dataplicity.com) is what I am looking for. What would be the best way of setting this up safely?
Might be useful to clarify: I'm using a raspberry Pi!
Thanks in advance!
If you want to give the outside world access to your dashboard, you can also consider to host your node-red application in the cloud. See links at the bottom-left of page https://nodered.org/docs/getting-started/
Most of those services have a free tier - so it might you cost nothing.
If you cannot deploy your complete node-red in the cloud (e.g. because it is reading local sensors) then you can split your node-red application into 2 node-red applications: one running locally and one (with the dashboard) running in the cloud. Of course then the 2 node-red applications need to exchange messages: for this the cloud services mentioned on that page also provides a secure way to send and receive events from the node-red cloud application that you can use.

Using Linux to execute a query from Windows server by ODBC connection

Here is the problem: We have a client that uses Progress Openedge database, we need to execute queries on this database from our servers.
Currently the drivers are installed on our Windows server, and the PHP code uses ODBC to run the queries.
Now we would like to move the code to a Linux server. We tried before to work with their linux drivers but that attempt has failed.
The question is, Is it possible somehow to run PHP code on a linux server, this code communicates with the Windows server, runs the query on the Windows server, and return the results to Linux?
How would you access to this problem.
Thanks!
Yes, it's possible. Your question boils down to "how can my Linux server ask my Windows server to do something" (where the "something" happens to be "talk to a database"), and there are a variety of ways to accomplish that. You could run a web service (RESTful or SOAP) on the Windows server, for example.
Make sure you think about security: if you deploy a service on your Windows server that lets remote clients modify a database, you have to be mindful of which remote clients are allowed to use that service. The last thing you want to do is accidentally allow random strangers to run arbitrary queries against your database.
We have a Knowledgebase Article detailing some setup procedures for Linux installations; it also has a video explaining some aspects of the setup. If the other answered haven't provided a complete solution for you, hopefully our article can at least get you started in the right direction.
Also keep in mind that depending on your version of OE, the driver libraries may be different.

Where can I host a node.js chat bot?

I know this isnt coding but i dont know where else to look.
So I've written a chat bot using node.js and the socket.io-client module. Basically it's just a program that auto responds to messages on a chat room also written with node.js. The problem I have is hosting it. I have hosted it on my raspberry pi which works perfectly but isn't ideal as I sometimes want my pi for other things and this bot runs 24/7.
So, I looked around for some free node.js hosting. I found c9.io, heroku and appfog but all of them expect you to host websites with node.js and so aren't setup for my needs. I need a single instance to be always running but these hosts constantly restart and terminate the program causing all sorts of problems for me which wouldn't really be an issue if it was just outputting a web page.
So, is there anywhere that is suitable for hosting a node.js app like mine?
Have Amazon host it for you. That's what I'm doing with one of my projects. Just create an instance, I used Ubuntu for my OS, then installed Node.js and was good to go.
My recommendation will be to host it on openshift
https://www.openshift.com/app/account/new
Heroku is also widely used but in their free tier your bot has to "sleep" 6 hours
https://www.heroku.com/

Resources