Wikipedia:Reference desk/Archives/Computing/2023 August 5

From Wikipedia, the free encyclopedia
Computing desk
< August 4 << Jul | August | Sep >> Current desk >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


August 5[edit]

GitHub App Setup Help[edit]

Hello. Due to the Reddit API changes as of last month, the offsite Firebase app I have been using to automatically backup my Reddit contents no longer functions. So, I intend to install and use a self-hosted app from here as a replacement. The third step asks me to create environment variable file using the command "cp ./backend/.env_example ./backend/.env_prod". Unfortunately, this does not do anything and no new environment variable file is created no matter how many time I put in the command.

I am using macOs Monterey 12.6.8 and Terminal for the setup. For the requirements, I have git via Xcode and Docker Desktop installed. The developer has not listed any contact info on their GitHub pages and I sent a message to their reddit account a week ago but I have not received any reply yet. I have opened a new issue on the GitHub page and asked for help from the GitHub community but neither of those have been answered yet. 70.95.32.27 (talk) 16:16, 5 August 2023 (UTC)[reply]

I'm not clear what you mean by "no new environment variable file is created". The file they are referring to is the target of the cp command, backend/.env_prod. Are you saying that after you execute the cp command, that file does not exist? Do you see any error message when you run cp? What do you see if, after you run the cp command, you run ls backend? CodeTalker (talk) 16:25, 5 August 2023 (UTC)[reply]
After I execute the cp command, the file does not exist. There is no error message after I run cp. After I run "ls backend", only the items visibly located in the backend folder pop up (controller, model, nodemon.json, package-lock.json, package.json) and they have been there since I created the expanse folder in the first command. The "env.example" did not show up in the "backend" folder at any point either. 70.95.32.27 (talk) 20:30, 5 August 2023 (UTC)[reply]
Ah sorry, I didn't notice that both filenames begin with a dot. By default, ls won't show such files. Try ls -a. CodeTalker (talk) 20:56, 5 August 2023 (UTC)[reply]
@CodeTalker So, I ran ls -a and here is what I got:
. .gitignore compose.dev.yaml
.. CONTRIBUTING.md compose.prod.yaml
.dockerignore LICENSE dockerfile
.git README.md expanse.service
.gitattributes SPONSORS.md frontend
.github backend run.sh
18 items total separate from each other by a single space. 70.95.32.27 (talk) 03:47, 6 August 2023 (UTC)[reply]
I wasn't clear: I meant run ls -a in the backend directory where you expect the env files to be, like this:
ls -a backend
I'm expecting this will show that both the .env_example and the .env_prod are present. CodeTalker (talk) 03:53, 6 August 2023 (UTC)[reply]
I ran la -a backend and those files are indeed there. But, I don't see them in the backend folder itself and could not find it through Finder either and so I am not sure how am I supposed to do step iv of the setup "fill out the values in the ./backend/.env_prod file". 70.95.32.27 (talk) 04:21, 6 August 2023 (UTC)[reply]
Just like ls, by default Finder does not show files whose name begins with a dot. You could edit the .env_prod file with vi from the command line by just giving its name ("vi backup/.env_prod"), but if you don't use vi or for some other reason prefer to access it via Finder, press Command-Shift-Dot in Finder to show the dot files. CodeTalker (talk) 05:34, 6 August 2023 (UTC)[reply]
Thanks for the help. I was finally able to get the app up and running although my computer slowed down a bit while it is active. 70.95.32.27 (talk) 09:52, 6 August 2023 (UTC)[reply]
Resolved
70.95.32.27 (talk) 09:53, 6 August 2023 (UTC)[reply]
(edit conflict) It's not clear what you mean by "don't see them in the backend folder itself". On Windows I would assume this means you can't see them in Explorer but as I understand it the default and normal equivalent to Explorer is Finder but you also said could not find it through Finder either so it seems you weren't referring to Finder in the first part. Unless you meant you couldn't find it when you searched in Finder, and you also couldn't see it when you were simply browsing using Finder. Or maybe you mean you can't see it when browsing via the open file functionality of whatever GUI text editor you're trying to use, although I suspect this might be some subset of Finder as well. In any case, you could likely make Finder show hidden files e.g. [1]. But also you could likely simply open the file even without being able to see it in Finder. I think either open -a TextEdit backend/.env_prod or open -e backend/.env_prod should work if you want to use TextEdit although my knowledge of OS X is very limited. Nil Einne (talk) 05:42, 6 August 2023 (UTC)[reply]
OS X is based upon LinuxUNIX and under LinuxUNIX I would always recommend ls -A which means "almost all" and excludes both "." and ".." rather than ls -a which includes them. You might also wish to use ls -Al which includes more information, particularly access information and modification date. Martin of Sheffield (talk) 09:11, 6 August 2023 (UTC)[reply]
While OS X, now macOS, has incorporated various Linuxisms, it is historically not based on Linux. In simplified form, its pedigree is Mach + BSDNeXTSTEPXNUMac OS X.  --Lambiam 21:42, 6 August 2023 (UTC)[reply]
Fair enough, for "Linux" above, read "UNIX". It doesn't alter the advice to use ls -A or ls -Al one iota. Martin of Sheffield (talk) 21:52, 6 August 2023 (UTC)[reply]