Posts

MERN stack dev notes: Feb 2025

Last updated on 18 Feb. 2025 To kill earlier instance of node server if new node server instance fails due to port not being free, in PowerShell (also for React app server): Get-Process -Id (Get-NetTCPConnection -LocalPort 4000).OwningProcess  Id is the process Id. Task Manager can be used to safely kill the process (command line option is there but perhaps prone to typo risk) Ref: How do I find out which process is listening on a TCP or UDP port on Windows? [closed], https://stackoverflow.com/questions/48198/how-do-i-find-out-which-process-is-listening-on-a-tcp-or-udp-port-on-windows ... Run React and Node on single Port | by Musab Abbasi | Medium,  https://abbasimusab2000.medium.com/setting-up-mern-website-on-single-port-for-deployment-4ab4ada8fe4d , Oct. 2022 Different ways to connect react frontend and node backend - DEV Community,  https://itsrakesh.com/blog/different-ways-to-connect-react-frontend-and-node-backend-1pik , Nov. 2021 ... [Around 15 Feb. 2025:] Restar...

Very Simple Launch and One-Touch-Add Timestamp Recorder Android App

Image
Last updated on 15 Feb. 2025 Quick-Info This is a very simple launch/redraw and one-touch-add timestamp recorder Android app. It will automatically create a timestamp (with no text associated with it) when the app is launched. The app will display a hardcoded maximum number of previous launch timestamps. It also has button to clear the timestamps, add a timestamp and to show app info. Screenshot of Android app (possibly older version but with similar screen as current version) running on my Samsung M21 phone: [Chrome browser: To open pic in larger resolution, on PC right-click on pic followed by open link (NOT image) in new tab/window and on mobile, press pic and choose Open in new tab. Then switch to new tab/window and on PC you may have to click on pic to zoom in.] APK file download link: [If you don't know about how to sideload an apk, please see 'Sideloading' in Details section.]   app-release.apk (Google Drive)  (built on 14/15 Feb. 2025, release version, 5.7 MB). Sour...

Notes on creating debug and release APKs using Android Studio and running them on phone/device

Last updated on 10 Feb. 2025 My post: Notes on using React Native without Expo framework and Expo Go,  https://raviswdev.blogspot.com/2025/02/notes-on-using-react-native-without.html covers how to create APKs for React Native projects not using Expo framework, and installing and running these APKs on my Samsung M21 Android phone. That led me to explore creating APKs using Android Studio and installing and running these on my Samsung M21 phone. Notes related to this work are given below. I think the notes are of 5 Feb. 2025 or perhaps from a day or two earlier. The tutorial app code I used with minor variation:  https://developer.android.com/codelabs/basic-android-kotlin-compose-first-app#6 Build your app for release to users, https://developer.android.com/build/build-for-release : If the build variant you've selected is a debug build type, then the APK is signed with a debug key and it's ready to install. If you've selected a release variant, then, by default, the APK is ...

Windows 11 Operation Tips and Issues Log

Last updated on 15th Feb. 2025 Chronological Order 5th Feb. 2025 Today (which perhaps was there yesterday too but I am not sure), I started facing a problem of slow PC operation on Windows 11. Saw that the disk activity light was almost constantly on. Task Manager showed "windows modules installer worker" as the CPU hog. Net browsing indicated that it could be related to Windows Update. I recalled that I had a partially done optional update which I later realized I don't need. To fix that, I followed general instructions on Troubleshoot Windows Update in this video (around 1st half of video, IFIRC): How to Fix the Windows Modules Installer 100% Disk Issue [Guide], https://www.youtube.com/watch?v=nony1q7F5oQ , around 4 mins, Jun. 2024. Key action that seems to have fixed the issue for me: As admin, search Troubleshoot -> Choose Troubleshoot Settings -> Other troubleshooters -> Click on Run button for Windows Update. That brought up another 'Get Help' wind...

Notes on using React Native without Expo framework and Expo Go

Last updated on 5 Feb. 2025 Related post: Notes on React Native and Expo,  https://raviswdev.blogspot.com/2024/12/notes-on-react-native.html . The APK created using React Native and Expo using default settings was 168 MB in size. See above mentioned post for more info. on it. I wanted to check out the possibility of using React Native without Expo and see the APK size (with default settings) it creates. This post covers notes related to that. 4th Feb. 2025: Using React Native without Expo framework and Expo Go https://reactnative.dev/docs/set-up-your-environment covers setup to use Android Studio to build React Native app. Publishing to Google Play Store, https://reactnative.dev/docs/signed-apk-android ... Can be used to only create APK files w/o publishing to Google Play Store as per video: Build apk file from React Native Application, https://www.youtube.com/watch?v=2yHI0e4MzUE , 5 min. 45 secs, Aug. 2023. Get Started Without a Framework, https://reactnative.dev/docs/gett...

Budget PC config for good speed MERN stack development and OK speed for beginner level Android dev (Intel i3-12100, Gigabyte H610M K, 16 GB DDR4 RAM)

Last updated on 1st Feb. 2025 Quick Info Budget PC configuration of Intel Core i3-12100 processor, GIGABYTE H610M K motherboard, 16 GB (as 2 x 8 GB) Crucial DDR4 RAM, 240 GB SSD, 400 Watts SMPS (550 Watts SMPS would be safer), PC cabinet, 22 inch. monitor, keyboard and mouse seems to be good for MERN stack development and OK for, at least beginner level, Android app. development with Android emulator. Details Decided to put up this post as it may be useful to students (and others) who are on a tight budget but want to learn and develop MERN stack web apps and mobile apps using React Native. This post captures in short, the upgrade of my PC and testing my Next.js Gita app build & run and tiny Android app build & run using Android Studio and Android Emulator. This post follows up on my previous post: Upgrading my AMD FX-4100 quad-core utility desktop PC to budget web app and mobile app software development PC,  https://raviswdev.blogspot.com/2025/01/upgrading-my-amd-fx-4...

Windows 10: Switch between dark mode and light mode through Powershell scripts with icons for them in Taskbar

Given below are notes I had made in June 2024 for my solution to have two Powershell scripts to switch to light mode or dark mode in Windows 10, and have shortcuts for these scripts pinned to Taskbar with suitable icons. I have used them for 6 months now without any issues. Further, I was able to replicate the method using these notes on a fallback mini Laptop with Windows 10 that I am using nowadays (since my main desktop PC has stopped working). PS command to enable dark mode New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force PS command to remove dark mode (and so use light mode) Remove-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme Ref: Instantly switch between dark and light mode for Windows, https://stackoverflow.com/questions/77179391/instantly-switch-between-dark-and-light-mode-for-windows ---- To run shortcuts of PS script fil...