What’s a simple development setup for React, Node, and databases on CachyOS?

0
0
Asked By MellowKite42 On

I'm new to development on CachyOS and would appreciate advice on setting up a reliable environment on a frequently updated operating system. I already have Node.js installed and plan to work with React, Node.js, Express, and PostgreSQL or MariaDB. Should I install Node.js inside Docker, or is it better to keep it on the host? I'd like to avoid unnecessary complexity while still keeping the project's versions and database setup manageable.

3 Answers

Answered By QuietFalcon88 On

Another approach is using Nix with devenv to define the development environment declaratively. That can provide strong reproducibility, but it has its own learning curve. For a straightforward setup, a host-installed Node version manager plus a Dockerized database is likely the simplest place to start.

Answered By VelvetOrbit3 On

Dockerizing Node.js is possible, but it can add extra friction with file watching, permissions, dependency volumes, and debugging. Since you’re still learning, keeping Node on CachyOS will probably make development easier. You can move it into a container later if you need a fully isolated or reproducible environment.

Answered By CopperLynx7 On

For this stack, I’d keep Node.js and the React/Express tools on the host for now, then use a version manager such as fnm, nvm, or asdf. Pin the project’s Node version with an .nvmrc or tool-versions file so system updates don’t make the project depend on whatever version happens to be installed. Use Docker Compose for PostgreSQL or MariaDB, since containers make databases easy to recreate, reset, and keep separate from the host system.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.