How do I structure a Meteor project with external scripts?
I am wondering if anyone has developed a best practice for organizing Meteor applications containing external shell scripts, or other internal processes that take place outside of the node.js server code and client side js code.
For example, I have a meteor application that is structured like this:
project-name
client
lib
models
packages
public
server
I have a shell script that handles some external data sources and a Python script that does some other heavy lifting. It all helps by inserting new data into the Mongo instance. Yes, I know there is a bit of a mess, but also system data. My question is, should I put these projects in the meteorites app folder or should they live outside of the system? Just curious how others structure such applications.
Option number 1
project-name
client
...
server
data-processor.sh
other-utility.py
Option number 2
project-name
client
...
private
data-processor.sh
other-utility.py
Option number 3
bin
data-processor.sh
other-utility.py
meteor-project-name
client
...
private
source to share
You shouldn't put any non-meteor files in your meteor project directory, all of them can be captured by some package even if the standard packages meteor-platform
don't recognize the extension. Thus, placing them in /server
may cause problems in the future. A folder /private
, on the other hand, is for the resources your application uses, so placing scripts there is inelegant and inelegant.
To avoid moving these scripts outside the project folder, you can store them in a hidden directory, which is any directory with a name starting with a period, i.e. /.scripts
... Files placed there will not be received by Meteor.
source to share