Create a React app as a wordpress plugin.
The process create a wordpress plugin is documented here.
https://codex.wordpress.org/Plugins
With this steps you can create a React app within a Wordpress admin site.
Worpress is not dessigned to be friendly with Javascript libraries. So you might need some additional tricks to make this work correctly. Consider using the tools PHP provides you. But this could help you to visualize information without much touble.
1st Have an installed version of wordpress
MQTT with Python
The library that allows to connect and interact with an MQTT broker (mosquitto) is paho. to get it.
pip install paho-mqtt
You need to know two things before start (for now):
- MQTT broker (mosquitto) server IP and PORT
The default port of the MQTT broker is 1883
And for this test define a default Topic to communicate the clients. The Topic can also be called channel and can be defined as the conference room you enter whether to talk or to listen to it.
Install mosquitto MQTT on a raspberry
Add the repository source
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
Install the MQTT server.
sudo apt-get update
sudo apt-get install mosquitto
Validate it’s running
/etc/init.d/mosquitto status
Bonus. Run inside Docker.
Instead of installing directly in the machine, you can install it on Docker too.
Download the Docker image. This will download the “latest” version of the image.
docker pull eclipse-mosquitto
To run for the first time
docker run -it -p 1883:1883 -p 9001:9001 eclipse-mosquitto
There are two more options. Link with a configuration file and persist file storage. More on that, in the link bellow.
A tool for uploading static html files
This site is created using a static site generator called hugo. There are many others, few example are Jekyll or Hexo. For the book I’m writing (read) I use a different tool called Sphinx and helps organizing the content you want to publish.
How most of these site builder applications work is the following: You start by choosing a tempate to use, or code your own; load your images and other static files, and write each of your website’s pages to shape it the way you want it to be.
Adding a 3.5 LCD screen to a Raspberry
I bought a LCD pannel based on the Waveshare 3.5 screen. And ran a pre-loaded image, can find it here.
Burned the image into an SD card and it Worked.
So, if you are ok with that… you can stop reading.
So what’s the issue?
After booting I ran a dist-upgrade to see if it was ok, but the LCD screen stoped working.
I’d like to be able to use a fresh image from the official site. Desktop or Lite.
Deploying to a shared hosting non-default folder
By default I don’t like my web content to be on my server default drive. And the main reason is organization. That’s why I put it under a different folder. Ex. main_web/
Setting it on a NGINX server is done inside the *.config file, but on a shared hosting you don’t have access to those config files. Instead, the solution is located under a file called .htaccess.
This file is located under your shared hosting /public_web folder. If you have a cpanel manager you might not be able to find it on the File manager link. To find it, an alternative is to connect to your hosting using an FTP client.
Welcome to jaconsta
This is the new Jaconsta.
$ echo "now I can share some code"
And thoughts.
Welcome again.