Meteor - Serverside copy files from FS.Collection - node.js

I'm using a bash script to compile a Unity assetbundle. I run it on a server using an interval I setup in Meteor which I run as a server.
Using {{url}} client-side I can get the file url fine. But how can I copy/move or even access the physical file on the server?
I'd like to be able to copy files to my unity project and run my bash script.

Just remembered I defined a path to a folder when defining the collection. Having looked for it, i found all the files i need.
Apologies for wasting your time.

Related

Unable to run dotnet under certain directories?

I am using the command: dotnet "myfile.dll"
Initially it was giving me this error: The user's home directory could not be determined. Set the 'DOTNET_CLI_HOME' environment variable to specify the directory to use.
Now after messing around with it, I have moved my files to c:/mydir, and it is giving this error: Failed to initialize CoreCLR, HRESULT: 0x80070057. I found this, but isn't c:/mydir a drive root?
Couple of things I noted:
I am able to run the .dll fine in a different directory.
Both directories contain same files.
The reason I want to run it in c:/mydir is because I am using AWS CodeDeploy, and that is where it copies the files (as far as I know; and the other directories are just the old versions where the files get copied from).
These issues are not linked (the first one I get from running a automated shell script after installation, and the second I get from manually trying to launch the .dll).
If someone could help me solve either one of these issues it would be greatly appreciated.
Try adding Environment=DOTNET_CLI_HOME=/temp to your Service declaration in your .service file. Example syntax:
[Service]
...
Environment=VARNAME=VARCONTENTS
So the actual like would look like this
Environment=DOTNET_CLI_HOME=/temp

threejs build guide unclear

so i need to modify three.js.min and i need to rebuild it to have the changes take effect.
i did it before when it used to be via phyton, but the process & method seems to have changed.
i downloaded node.js as linked here in the quickstart guide: https://github.com/mrdoob/three.js/wiki/Build-instructions, and restarted my pc
this happens when i try to clone threejs as described:
the Quickstart says that i can also "download and unzip" the directory which i already did to work on it, but i am unsure where to place it and where the relative path starts.
so if i use cd ./three.js would the threejs folder be in the c:/programs/nodejs directory? do i need to register it first? am i on the completely wrong path?
sorry if this is a really dumb question, but the guide just does not make sense to me
ok so here are the mistakes i made:
i used the Node.js command window (from programs) instead of the windows cmd
i need to navigate to my threejs root folder containing the package.json file using cd ./nextFolder
now compiled & working without a problem

Basic empty file builder for NodeJS?

Perhaps I'm missing something about Node, but what I'm hoping to do is very very simple.
Recently I've been creating a lot of small projects to test small node modules individually before trying to use them in a larger complex project.
I just want to automate generating a blank index.html and main.js file with the appropriate empty tags. I suppose I could make some git repos and just pull those every time, but that seems like overkill. Or I could just create a command to copy files from some other directory to the current one.
But ideally - I could install "npm boiler" or something, then just run "boiler static-html" and have those files plop into the root directory.
I'm running a git bash shell in Windows btw, because work.
I didn't find a perfect solution, but Yeoman sort of handles what I'm after. A simplified version of Yeoman would be ideal.

How to get write permission to a /var/lib folder for app installed as a distiubutable package

I'm creating a mono app and I've build up a *.deb installer.
In windows I write quite a bit of configuration information into the program data directory. The linux corollary seems to be /var/lib/[appname]. I've figured out how to create the directories as part of the install package, but when the app goes to run I get an excpetion because the app doesn't have write permission.
How do I get my app to have write permission to the /var/lib/[appname] folder? Is that the correct place to put things like a local db for an app?
It seems the only way to do this is via the postinst script file.
You can use that hook to execute a script to chmod the directories to anything you want. You can find the complete documentation for the postinst file here: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#maintscripts

Node.js file backup script

Does anyone know of a node.js script that periodically runs a backup on a development directory? (The server I would like to run this on does not allow binaries for security reasons.)
You could use node-cron and use the fs module to copy the directory yourself.

Resources