Monday 11 September 2017

What do you recommend me in my situation? PHP API vs NodeJS

I've been learning and developing a very simple (almost finished) CRUD web application with JWTAuth included.The application is composed of: - Front-end: VueJS + Bootstrap4 - Backend: MySQL + Lumen (PHP REST API) + JWT for Auth (tymondesigns / jwt-auth)Until recently, I only had a simple shared hosting with Apache, PHP and MySQL.At that moment I doubted whether to do the application with an external service in real time like Firebase, but since it has user limitations among other things, I discarded it.The bad thing about the web application is that I would like to have if I add a record or data (having the application open at the same time on the computer and on the mobile) the changes were reflected in both devices in real time without refreshing the page or do Long Pulling Techniques.Right now I have a VPS that works great for me (in which I have running Webmi/Virtualmin + Websites + TeamSpeak3 server) with the following hardware features: 1 vCore (s), 2.4 GHz, 2GB of RAM, 10 GB SSDI was thinking of implementing something like socket.io to see real-time changes to CRUD on all open devices.I have been reading articles, comparisons and there are now too many technologies, options to create web applications. And this creates me enough doubts / questions that go around my head and it difficults me to decide.Below you will see the list of questions, ** all thinking for what i want to do **:Does the features on my vps server enough to make me do what I want?The best option is to make a REST API in NodeJS, use socket.io to emit when changes are made to the database and use NGINX as http server for static files in the web application (html, js, css ... etc) and configure a proxy reverse to point to the NodeJS server by the port 3000 for queries to the API?MongoDB vs. Mangosta vs MySQL vs another better option?Do you recommend Sails for the MVC?Do you recommend JWT as authentication?Thanks in advance and sorry for my English!

Submitted September 12, 2017 at 03:29AM by BlackCode7

No comments:

Post a Comment