To start with the Clinical Meteor Software Development Kit, we're going to need to set up a complete development environment. There's a large ecosystem of tools to use, so the focus in this document is on tools that are known to work together well on Mac OSX and are popular within the Meteor community.
GitHub Desktop App - For synchronizing and managing code.
Java 8 - Needed QA testing tools.
Visual Studio - Community 2017 - C++ compilers needed for some Node libraries.
Clinical Meteor prefers a Chrome environment. So much so, that its arguably an alternative Chrome OS. Not only will we be targeting Chrome as our preferred browser; we'll also be installing utilities as Chrome extensions; using a code editor built on Chrome, and using Chrome in our QA test runner. Clinical Meteor supports other browsers (particularly Firefox and Safari), but the bulk of it's work is done with Chrome.
Once you get Chrome installed, we recommend the following extensions; which will help develop Clinical Meteor apps.
apm commands from the terminal. After that is installed, we recommend the following packages:
Version Control Software
The easiest way to install
git is to install the GitHub Desktop App. You'll then have access to both the GUI and the command line.
$ git config --global user.name "Jane Doe" $ git config --global user.email firstname.lastname@example.org $ git config --global core.editor atom -w
Meteor Installation Walkthrough
This quickstart is written for Mac OSX Mavericks, and is a bit more verbose than other installation instructions. It should hopefully cover a few edge cases, such as setting your path, which can cause an installation to go awry.
# install meteor curl https://install.meteor.com | sh # check it's installed correctly meteor --version # install npm curl -0 -L https://npmjs.org/install.sh | sh # check node is installed correctly node --version # check npm is installed correctly npm -version # find your npm path which npm # make sure npm is in your path sudo nano ~/.profile export PATH=$PATH:/usr/local/bin
If you have any problems with EACCESS pr ENOENT errors, check the file permissions of your NPM directories.
Robomongo - A sweet, sweet database management tool for MongoDB.
Here's the script the author uses when setting up a new development workstation. It's certainly not the only environment setup script, and it's by no means authoritative. It's simply what seems to work.
# install stand-alone mongo with the gui installer http://www.mongodb.org/dr//fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.6.3.tgz/download # or install from command line curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.6.3.tgz > mongodb-osx-x86_64-2.6.3.tgz tar -zxvf mongodb-osx-x86_64-2.6.3.tgz mkdir -p /var/mongodb cp -R -n mongodb-osx-x86_64-2.6.3/* /usr/local/mongodb # make sure mongo is in your local path nano ~/.profile export PATH=$PATH:/usr/local/mongodb/bin # or install it to the global path nano /etc/paths /usr/local/mongodb/bin # create mongo database directory mkdir /data/ mkdir /data/db chown -R username:admin /data # run mongodb server mongod ctrl-c # check that you can connect to your meteor app with stand-alone mongo terminal-a$ meteor create helloworld terminal-a$ cd helloworld terminal-a$ meteor terminal-b$ mongo -port 3001 # install robomongo database admin tool http://robomongo.org/ # check you can connect to your mongo instance with robomongo terminal-a$ meteor create helloworld terminal-a$ cd helloworld terminal-a$ meteor Dock$ Robomongo > Create > localhost:3001 # install node-inspector terminal-a$ npm install -g node-inspector # start meteor terminal-a$ cd helloworld terminal-a$ NODE_OPTIONS='--debug-brk --debug' mrt run # alternatively, some people report this syntax being better terminal-a$ sudo NODE_OPTIONS='--debug' ROOT_URL=http://helloworld.com meteor --port 80 # launch node-inspector along side your running app terminal-b$ node-inspector # go to the URL given by node-inspector and check it's running http://localhost:8080/debug?port=5858 # install jshint npm install -g jshint # run code analysis on local directory cd helloworld jshint .
Test-driven development is essential for building larger and more complex apps. The following script will get you up-and-running with automated browser walkthroughs using the Nightwatch bridge to a Selenium Server. Be aware that this script won't create tests for you. You will need to create a tests/nightwatch directory with walkthroughs in it.
# install the StarryNight utility npm install starrynight -g # add .meteor/nightwatch.json to our application $ starrynight generate-autoconfig # add acceptance tests to your application (using the nightwatch framework) $ starrynight scaffold --framework nightwatch # run your validation tests using NightWatch $ starrynight run-tests --framework nightwatch # run any verification tests you may have written with TinyTest $ starrynight run-tests --framework tinytest-ci