This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| const fs = require('fs'); | |
| const path = require('path'); | |
| function moveContentsToParentDirectory(directoryPath) { | |
| // Get the list of files and directories in the given directory | |
| const contents = fs.readdirSync(directoryPath); | |
| contents.forEach(item => { | |
| const itemPath = path.join(directoryPath, item); | |
| const stats = fs.statSync(itemPath); |
| #include <Adafruit_NeoPixel.h> | |
| #include <TimeLib.h> | |
| #include <Arduino.h> | |
| #define ADAFRUIT_NEOPIXEL_CTL_PIN 12 // Control line for the Adafruit NeoPixel | |
| #define ADAFRUIT_NEOPIXEL_PWR_PIN 11 // Power line for the Adafruit NeoPixel | |
| #define ADAFRUIT_NEOPIXEL_NUMPIXELS 1 // Total number of Adafruit NeoPixels | |
| #define ADAFRUIT_NEOPIXEL_BRIGHTNESS 255 // uint8_t (0-255) | |
| Adafruit_NeoPixel pixels( | |
| ADAFRUIT_NEOPIXEL_NUMPIXELS, |
| use std::{fmt::Debug, future::Future}; | |
| use log::debug; | |
| /// Custom unsafe wrapper around [Send], used for passing around pointers | |
| /// between [tokio::task]s. | |
| pub(crate) struct UnsafeSend<T>(T); | |
| /// The Send trait is automatically implemented when the compiler determines it's appropriate. | |
| /// However, for current use-case, it would not be possible, since it is not allowed to share | |
| /// multiple mutable references between threads. |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).